usbloadergx/source/GUI/gui_optionbrowser.h
dimok321 0f4eb6b209 *several code optimizations
*added saving of game browser position (on all modes)
*several cleanups and small fixes
*added a "Block Category Menu" setting
*fixed bug with parental block and game settings (thanks NJ7 for finding it)
*fixed "All" not being translated in category menu
2011-06-24 19:11:36 +00:00

50 lines
1.3 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