mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-28 00:55:39 +00:00
f336eece75
As usual, it's undertested, please report any problems.
55 lines
1.2 KiB
C++
55 lines
1.2 KiB
C++
#ifndef _GUIGAMELIST_H_
|
|
#define _GUIGAMELIST_H_
|
|
|
|
#include "../GuiComponent.h"
|
|
#include "GuiList.h"
|
|
#include "GuiImage.h"
|
|
#include "GuiTheme.h"
|
|
#include "GuiAnimation.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 GuiList child that handles the game list, a GuiTheme that handles the theming system, and a GuiImage for game images.
|
|
class GuiGameList : public GuiComponent
|
|
{
|
|
public:
|
|
GuiGameList(bool useDetail = false);
|
|
~GuiGameList();
|
|
|
|
void setSystemId(int id);
|
|
|
|
void onRender();
|
|
void onInput(InputManager::InputButton button, bool keyDown);
|
|
void onPause();
|
|
void onResume();
|
|
void onInit();
|
|
void onDeinit();
|
|
|
|
static GuiGameList* create();
|
|
|
|
static const float sInfoWidth;
|
|
private:
|
|
void updateList();
|
|
void updateTheme();
|
|
void updateDetailData();
|
|
void clearDetailData();
|
|
std::string getThemeFile();
|
|
|
|
SystemData* mSystem;
|
|
FolderData* mFolder;
|
|
std::stack<FolderData*> mFolderStack;
|
|
int mSystemId;
|
|
bool mDetailed;
|
|
|
|
GuiList<FileData*>* mList;
|
|
GuiImage* mScreenshot;
|
|
GuiAnimation* mImageAnimation;
|
|
GuiTheme* mTheme;
|
|
};
|
|
|
|
#endif
|