mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-23 22:55:39 +00:00
ccea2a7e04
Added a simple "LOADING" screen when ES starts up. ViewController now preloads GameListViews so there's no lag when browsing to a system for the first time.
56 lines
1 KiB
C++
56 lines
1 KiB
C++
#ifndef _WINDOW_H_
|
|
#define _WINDOW_H_
|
|
|
|
#include "GuiComponent.h"
|
|
#include "InputManager.h"
|
|
#include <vector>
|
|
#include "resources/Font.h"
|
|
|
|
class ViewController;
|
|
|
|
class Window
|
|
{
|
|
public:
|
|
Window();
|
|
~Window();
|
|
|
|
void pushGui(GuiComponent* gui);
|
|
void removeGui(GuiComponent* gui);
|
|
GuiComponent* peekGui();
|
|
|
|
void input(InputConfig* config, Input input);
|
|
void update(int deltaTime);
|
|
void render();
|
|
|
|
bool init(unsigned int width = 0, unsigned int height = 0);
|
|
void deinit();
|
|
|
|
inline InputManager* getInputManager() { return mInputManager; }
|
|
inline ViewController* getViewController() { return mViewController; }
|
|
|
|
void normalizeNextUpdate();
|
|
|
|
bool getAllowSleep();
|
|
void setAllowSleep(bool sleep);
|
|
|
|
void renderLoadingScreen();
|
|
|
|
private:
|
|
InputManager* mInputManager;
|
|
ViewController* mViewController;
|
|
std::vector<GuiComponent*> mGuiStack;
|
|
|
|
std::vector< std::shared_ptr<Font> > mDefaultFonts;
|
|
|
|
int mFrameTimeElapsed;
|
|
int mFrameCountElapsed;
|
|
int mAverageDeltaTime;
|
|
std::string mFrameDataString;
|
|
|
|
bool mNormalizeNextUpdate;
|
|
|
|
bool mAllowSleep;
|
|
};
|
|
|
|
#endif
|