2010-11-13 23:34:53 +01:00
|
|
|
#ifndef _GUIGAMEBROWSER_H_
|
|
|
|
#define _GUIGAMEBROWSER_H_
|
|
|
|
|
|
|
|
#include "gui.h"
|
2011-06-14 19:53:19 +02:00
|
|
|
#include "gui_scrollbar.hpp"
|
|
|
|
#include "usbloader/disc.h"
|
2010-11-13 23:34:53 +01:00
|
|
|
|
2011-06-14 19:53:19 +02:00
|
|
|
class GuiGameBrowser: public GuiElement, public sigslot::has_slots<>
|
2010-11-13 23:34:53 +01:00
|
|
|
{
|
|
|
|
public:
|
2010-12-12 17:31:13 +01:00
|
|
|
GuiGameBrowser(int w, int h, int selectedGame = 0);
|
2010-11-13 23:34:53 +01:00
|
|
|
~GuiGameBrowser();
|
|
|
|
int FindMenuItem(int c, int d);
|
|
|
|
int GetClickedOption();
|
2011-02-25 19:18:57 +01:00
|
|
|
int GetSelectedOption() { return listOffset+selectedItem; }
|
2010-11-13 23:34:53 +01:00
|
|
|
void ResetState();
|
|
|
|
void SetFocus(int f);
|
|
|
|
void Draw();
|
|
|
|
void Update(GuiTrigger * t);
|
|
|
|
int GetOffset();
|
|
|
|
protected:
|
2011-06-14 19:53:19 +02:00
|
|
|
void onListChange(int SelItem, int SelInd);
|
2010-11-13 23:34:53 +01:00
|
|
|
void UpdateListEntries();
|
|
|
|
int selectedItem;
|
|
|
|
int listOffset;
|
|
|
|
int scrollbaron;
|
|
|
|
int pagesize;
|
|
|
|
int maxTextWidth;
|
|
|
|
|
|
|
|
int * gameIndex;
|
|
|
|
GuiButton ** game;
|
|
|
|
GuiText ** gameTxt;
|
|
|
|
GuiText ** gameTxtOver;
|
|
|
|
GuiImage ** gameBg;
|
|
|
|
GuiImage ** newImg;
|
|
|
|
|
|
|
|
GuiImage * bgGameImg;
|
|
|
|
|
|
|
|
GuiImageData * bgGames;
|
|
|
|
GuiImageData * bgGamesEntry;
|
|
|
|
GuiImageData * newGames;
|
|
|
|
|
|
|
|
GuiTrigger * trigA;
|
2011-06-14 19:53:19 +02:00
|
|
|
|
|
|
|
GuiScrollbar scrollBar;
|
2010-11-13 23:34:53 +01:00
|
|
|
};
|
|
|
|
#endif
|