ES-DE/src/components/GuiGameList.h

60 lines
1.4 KiB
C
Raw Normal View History

#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"
#include "TextComponent.h"
#include <string>
#include <stack>
#include "../SystemData.h"
#include "../GameData.h"
#include "../FolderData.h"
//This is where the magic happens - GuiGameList is the parent of almost every graphical element in ES at the moment.
//It has a TextListComponent child that handles the game list, a ThemeComponent that handles the theming system, and an ImageComponent for game images.
2013-06-02 15:08:32 +00:00
class GuiGameList : public GuiComponent
{
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();
void setSystemId(int id);
2013-06-02 15:08:32 +00:00
bool input(InputConfig* config, Input input);
void update(int deltaTime);
void render();
2013-04-08 16:52:40 +00:00
void init();
void deinit();
2013-04-08 17:40:15 +00:00
void updateDetailData();
2013-04-08 16:52:40 +00:00
static GuiGameList* create(Window* window);
static const float sInfoWidth;
private:
void updateList();
void updateTheme();
2012-10-17 17:15:58 +00:00
void clearDetailData();
std::string getThemeFile();
SystemData* mSystem;
FolderData* mFolder;
std::stack<FolderData*> mFolderStack;
int mSystemId;
bool mDetailed;
2013-06-02 15:08:32 +00:00
TextListComponent<FileData*>* mList;
ImageComponent* mScreenshot;
TextComponent mDescription;
2013-06-02 15:08:32 +00:00
AnimationComponent* mImageAnimation;
ThemeComponent* mTheme;
Vector2i getImagePos();
};
#endif