-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAppStateManager.hpp
More file actions
46 lines (32 loc) · 993 Bytes
/
AppStateManager.hpp
File metadata and controls
46 lines (32 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//================================================//
#ifndef __APPSTATEMANAGER_HPP__
#define __APPSTATEMANAGER_HPP__
//================================================//
#include "AppState.hpp"
//================================================//
class AppStateManager : public AppStateListener
{
public:
typedef struct{
Ogre::String name;
AppState* state;
} state_info_t;
AppStateManager(void);
~AppStateManager(void);
void manageAppState(Ogre::String stateName, AppState* state);
AppState* findByName(Ogre::String stateName);
void start(AppState* state);
void changeAppState(AppState* state);
bool pushAppState(AppState* state);
void popAppState(void);
void pauseAppState(void);
void shutdown(void);
protected:
void init(AppState* state);
std::vector<AppState*> m_ActiveStateStack;
std::vector<state_info_t> m_States;
bool m_bShutdown;
};
//================================================//
#endif
//================================================//