Voxeloop  0.1.0
Musical Loop Generation in Voxel World
MenuState.hpp
Go to the documentation of this file.
1 #ifndef CORE_INCLUDE_MENUSTATE_HPP
2 #define CORE_INCLUDE_MENUSTATE_HPP
3 
4 #include "AboutState.hpp"
5 #include "Common.hpp"
6 #include "CoreEngine.hpp"
7 #include "PlayState.hpp"
8 #include "SettingsState.hpp"
9 #include "StateMachine.hpp"
10 // #include "...State.hpp"
11 
12 class MenuState : public StateMachine {
13 public:
14  void init();
15  void cleanup();
16 
17  void pause();
18  void resume();
19 
20  void handleEvents(CoreEngine *engine);
21  void update(CoreEngine *engine);
22  void draw(CoreEngine *engine);
23 
24  static MenuState *instance() { return &m_menuState; }
25 
26 protected:
27  MenuState() {}
28 
29 private:
31 
33  uint8_t nextState;
34 };
35 
36 #endif // CORE_INCLUDE_MENUSTATE_HPP
std::shared_ptr< GameData > SharedDataRef
Definition: Common.hpp:14
The underlying engine that handles everything underneath.
Definition: CoreEngine.hpp:14
Definition: MenuState.hpp:12
void pause()
Definition: MenuState.cpp:9
void init()
Definition: MenuState.cpp:5
void draw(CoreEngine *engine)
Definition: MenuState.cpp:17
SharedDataRef m_sharedData
Definition: MenuState.hpp:32
void resume()
Definition: MenuState.cpp:11
static MenuState m_menuState
Definition: MenuState.hpp:30
static MenuState * instance()
Definition: MenuState.hpp:24
void cleanup()
Definition: MenuState.cpp:7
uint8_t nextState
Definition: MenuState.hpp:33
void handleEvents(CoreEngine *engine)
Definition: MenuState.cpp:13
MenuState()
Definition: MenuState.hpp:27
void update(CoreEngine *engine)
Definition: MenuState.cpp:15
Definition: StateMachine.hpp:6