ES-DE/src/Window.h

60 lines
1.1 KiB
C
Raw Normal View History

#ifndef _WINDOW_H_
#define _WINDOW_H_
2013-06-02 15:08:32 +00:00
#include "GuiComponent.h"
#include "InputManager.h"
#include <vector>
#include "resources/Font.h"
class ViewController;
class HelpComponent;
class Window
{
public:
Window();
~Window();
2013-06-02 15:08:32 +00:00
void pushGui(GuiComponent* gui);
void removeGui(GuiComponent* gui);
GuiComponent* peekGui();
void input(InputConfig* config, Input input);
void update(int deltaTime);
void render();
2013-07-09 10:37:37 +00:00
bool init(unsigned int width = 0, unsigned int height = 0);
2013-04-08 17:40:15 +00:00
void deinit();
inline InputManager* getInputManager() { return mInputManager; }
inline ViewController* getViewController() { return mViewController; }
void normalizeNextUpdate();
bool getAllowSleep();
void setAllowSleep(bool sleep);
void renderLoadingScreen();
void setHelpPrompts(const std::vector<HelpPrompt>& prompts);
private:
InputManager* mInputManager;
ViewController* mViewController;
HelpComponent* mHelp;
2013-06-02 15:08:32 +00:00
std::vector<GuiComponent*> mGuiStack;
std::vector< std::shared_ptr<Font> > mDefaultFonts;
int mFrameTimeElapsed;
int mFrameCountElapsed;
int mAverageDeltaTime;
std::string mFrameDataString;
bool mNormalizeNextUpdate;
2013-08-06 13:15:20 +00:00
bool mAllowSleep;
};
#endif