2012-07-20 01:08:29 +00:00
|
|
|
#ifndef _GUIGAMELIST_H_
|
|
|
|
#define _GUIGAMELIST_H_
|
|
|
|
|
2013-06-02 15:08:32 +00:00
|
|
|
#include "../GuiComponent.h"
|
|
|
|
#include "TextListComponent.h"
|
|
|
|
#include "ImageComponent.h"
|
|
|
|
#include "ThemeComponent.h"
|
|
|
|
#include "AnimationComponent.h"
|
2012-07-20 01:08:29 +00:00
|
|
|
#include <string>
|
2012-07-27 16:58:27 +00:00
|
|
|
#include <stack>
|
2012-07-20 16:14:09 +00:00
|
|
|
#include "../SystemData.h"
|
|
|
|
#include "../GameData.h"
|
2012-07-27 16:58:27 +00:00
|
|
|
#include "../FolderData.h"
|
2012-07-20 01:08:29 +00:00
|
|
|
|
2012-09-07 21:44:07 +00:00
|
|
|
//This is where the magic happens - GuiGameList is the parent of almost every graphical element in ES at the moment.
|
|
|
|
//It has a GuiList child that handles the game list, a GuiTheme that handles the theming system, and a GuiImage for game images.
|
2013-06-02 15:08:32 +00:00
|
|
|
class GuiGameList : public GuiComponent
|
2012-07-20 01:08:29 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-04-08 17:40:15 +00:00
|
|
|
GuiGameList(Window* window, bool useDetail = false);
|
2013-06-02 15:08:32 +00:00
|
|
|
virtual ~GuiGameList();
|
2012-07-21 19:06:24 +00:00
|
|
|
|
2012-07-21 20:57:53 +00:00
|
|
|
void setSystemId(int id);
|
2012-07-20 01:08:29 +00:00
|
|
|
|
2013-06-02 15:08:32 +00:00
|
|
|
bool input(InputConfig* config, Input input);
|
2013-04-09 18:13:47 +00:00
|
|
|
void update(int deltaTime);
|
|
|
|
void render();
|
2013-04-08 16:52:40 +00:00
|
|
|
|
2013-04-10 17:29:07 +00:00
|
|
|
void init();
|
|
|
|
void deinit();
|
2012-07-27 16:58:27 +00:00
|
|
|
|
2013-04-08 17:40:15 +00:00
|
|
|
void updateDetailData();
|
|
|
|
|
2013-04-08 16:52:40 +00:00
|
|
|
static GuiGameList* create(Window* window);
|
2012-10-05 20:18:36 +00:00
|
|
|
|
2012-08-14 01:27:39 +00:00
|
|
|
static const float sInfoWidth;
|
2012-07-20 01:08:29 +00:00
|
|
|
private:
|
2012-08-12 14:43:09 +00:00
|
|
|
void updateList();
|
2012-08-10 19:28:34 +00:00
|
|
|
void updateTheme();
|
2012-10-17 17:15:58 +00:00
|
|
|
void clearDetailData();
|
2012-12-17 19:29:43 +00:00
|
|
|
std::string getThemeFile();
|
2012-08-10 19:28:34 +00:00
|
|
|
|
2012-07-20 16:14:09 +00:00
|
|
|
SystemData* mSystem;
|
2012-07-27 16:58:27 +00:00
|
|
|
FolderData* mFolder;
|
|
|
|
std::stack<FolderData*> mFolderStack;
|
2012-07-21 20:57:53 +00:00
|
|
|
int mSystemId;
|
2012-08-02 01:43:55 +00:00
|
|
|
bool mDetailed;
|
|
|
|
|
2013-06-02 15:08:32 +00:00
|
|
|
TextListComponent<FileData*>* mList;
|
|
|
|
ImageComponent* mScreenshot;
|
|
|
|
AnimationComponent* mImageAnimation;
|
|
|
|
ThemeComponent* mTheme;
|
2012-07-20 01:08:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|