mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-23 10:21:55 +01:00
95 lines
2.0 KiB
C++
95 lines
2.0 KiB
C++
#ifndef _GUIGAMEBROWSER_H_
|
|
#define _GUIGAMEBROWSER_H_
|
|
|
|
#include "gui.h"
|
|
#include "../disc.h"
|
|
/*
|
|
class GameBrowserList {
|
|
public:
|
|
GameBrowserList(int size) {
|
|
name = new char * [size];
|
|
|
|
for (int i = 0; i < size; i++)
|
|
{
|
|
name[i] = new char[50];
|
|
}
|
|
length = size;
|
|
};
|
|
~GameBrowserList(){
|
|
for (int i = 0; i < length; i++)
|
|
{
|
|
delete [] name[i];
|
|
}
|
|
delete [] name;
|
|
};
|
|
|
|
public:
|
|
int length;
|
|
char ** name;
|
|
};
|
|
*/
|
|
|
|
class GuiGameBrowser : public GuiElement
|
|
{
|
|
public:
|
|
GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, const char *themePath, const u8 *imagebg, int selected = 0, int offset = 0);
|
|
~GuiGameBrowser();
|
|
int FindMenuItem(int c, int d);
|
|
int GetClickedOption();
|
|
int GetSelectedOption();
|
|
void ResetState();
|
|
void SetFocus(int f);
|
|
void Draw();
|
|
void Update(GuiTrigger * t);
|
|
int GetOffset();
|
|
//GuiText * optionVal[PAGESIZE];
|
|
protected:
|
|
int selectedItem;
|
|
int listOffset;
|
|
int scrollbaron;
|
|
int pagesize;
|
|
|
|
struct discHdr * gameList;
|
|
int gameCnt;
|
|
|
|
int * gameIndex;
|
|
GuiButton ** game;
|
|
GuiText ** gameTxt;
|
|
GuiImage ** gameBg;
|
|
|
|
GuiButton * arrowUpBtn;
|
|
GuiButton * arrowDownBtn;
|
|
GuiButton * scrollbarBoxBtn;
|
|
|
|
GuiImage * bgGameImg;
|
|
GuiImage * scrollbarImg;
|
|
GuiImage * arrowDownImg;
|
|
GuiImage * arrowDownOverImg;
|
|
GuiImage * ttarrowUpImg;
|
|
GuiImage * ttarrowDownImg;
|
|
GuiImage * arrowUpImg;
|
|
GuiImage * arrowUpOverImg;
|
|
GuiImage * scrollbarBoxImg;
|
|
GuiImage * scrollbarBoxOverImg;
|
|
|
|
GuiText * ttarrowDownTxt;
|
|
GuiText * ttarrowUpTxt;
|
|
|
|
GuiImageData * bgGames;
|
|
GuiImageData * bgGamesEntry;
|
|
GuiImageData * scrollbar;
|
|
GuiImageData * arrowDown;
|
|
GuiImageData * arrowDownOver;
|
|
GuiImageData * ttarrow;
|
|
GuiImageData * arrowUp;
|
|
GuiImageData * arrowUpOver;
|
|
GuiImageData * scrollbarBox;
|
|
GuiImageData * scrollbarBoxOver;
|
|
|
|
GuiSound * btnSoundOver;
|
|
GuiSound * btnSoundClick;
|
|
GuiTrigger * trigA;
|
|
GuiTrigger * trigHeldA;
|
|
};
|
|
#endif
|