2011-06-14 17:53:19 +00:00
|
|
|
#ifndef GUI_OPTIONBROWSER_H_
|
|
|
|
#define GUI_OPTIONBROWSER_H_
|
2010-11-13 22:34:53 +00:00
|
|
|
|
2009-09-30 23:10:58 +00:00
|
|
|
#include "gui.h"
|
2011-06-14 17:53:19 +00:00
|
|
|
#include "gui_scrollbar.hpp"
|
2010-11-13 22:34:53 +00:00
|
|
|
#include <vector>
|
2009-09-30 23:10:58 +00:00
|
|
|
|
|
|
|
//!Display a list of menu options
|
2011-06-14 17:53:19 +00:00
|
|
|
class GuiOptionBrowser: public GuiElement, public sigslot::has_slots<>
|
2010-02-09 10:59:55 +00:00
|
|
|
{
|
2011-07-25 22:28:22 +00:00
|
|
|
public:
|
|
|
|
GuiOptionBrowser(int w, int h, OptionList * l, const char * background);
|
|
|
|
virtual ~GuiOptionBrowser();
|
|
|
|
int GetClickedOption();
|
|
|
|
int GetSelectedOption();
|
|
|
|
void SetOffset(int optionnumber);
|
|
|
|
void ResetState();
|
|
|
|
void Draw();
|
|
|
|
void Update(GuiTrigger * t);
|
|
|
|
protected:
|
|
|
|
void onListChange(int SelItem, int SelInd);
|
|
|
|
void UpdateListEntries();
|
2011-09-23 23:49:18 +00:00
|
|
|
|
|
|
|
int oldSelectedItem;
|
2011-07-25 22:28:22 +00:00
|
|
|
int selectedItem;
|
|
|
|
int listOffset;
|
|
|
|
int coL2;
|
2009-09-30 23:10:58 +00:00
|
|
|
|
2011-07-25 22:28:22 +00:00
|
|
|
OptionList * options;
|
2011-09-23 23:49:18 +00:00
|
|
|
std::vector<GuiButton *> optionBtn;
|
|
|
|
std::vector<GuiText *> optionTxt;
|
|
|
|
std::vector<GuiText *> optionVal;
|
|
|
|
std::vector<GuiImage *> optionBg;
|
2009-09-30 23:10:58 +00:00
|
|
|
|
2011-07-25 22:28:22 +00:00
|
|
|
GuiImage * bgOptionsImg;
|
2009-09-30 23:10:58 +00:00
|
|
|
|
2011-07-25 22:28:22 +00:00
|
|
|
GuiImageData * bgOptions;
|
|
|
|
GuiImageData * bgOptionsEntry;
|
2009-09-30 23:10:58 +00:00
|
|
|
|
2011-07-25 22:28:22 +00:00
|
|
|
GuiTrigger * trigA;
|
|
|
|
GuiScrollbar scrollBar;
|
2009-09-30 23:10:58 +00:00
|
|
|
};
|
2010-11-13 22:34:53 +00:00
|
|
|
|
|
|
|
#endif
|