usbloadergx/source/GUI/gui_optionbrowser.h
dimok321 973d8b2005 *Fixed compile error
*Converted every 4 spaces to a tab to make the source consistent on those
2011-07-25 22:28:22 +00:00

50 lines
1.1 KiB
C++

#ifndef GUI_OPTIONBROWSER_H_
#define GUI_OPTIONBROWSER_H_
#include "gui.h"
#include "gui_scrollbar.hpp"
#include <vector>
//!Display a list of menu options
class GuiOptionBrowser: public GuiElement, public sigslot::has_slots<>
{
public:
GuiOptionBrowser(int w, int h, OptionList * l, const char * background);
virtual ~GuiOptionBrowser();
int FindMenuItem(int c, int d);
int GetClickedOption();
int GetSelectedOption();
void SetClickable(bool enable);
void SetOffset(int optionnumber);
void ResetState();
void SetFocus(int f);
void Draw();
void Update(GuiTrigger * t);
protected:
void onListChange(int SelItem, int SelInd);
void UpdateListEntries();
int selectedItem;
int listOffset;
int coL2;
bool scrollbaron;
bool listChanged;
OptionList * options;
int optionIndex[PAGESIZE];
GuiButton * optionBtn[PAGESIZE];
GuiText * optionTxt[PAGESIZE];
GuiText * optionVal[PAGESIZE];
GuiText * optionValOver[PAGESIZE];
GuiImage * optionBg[PAGESIZE];
GuiImage * bgOptionsImg;
GuiImageData * bgOptions;
GuiImageData * bgOptionsEntry;
GuiTrigger * trigA;
GuiScrollbar scrollBar;
};
#endif