Level H Engine
MainMenu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "State.h"
4 #include "StateManager.h"
5 #include "../UI/UIManager.h"
6 
10 class MainMenu : public State
11 {
12 public:
19 
23  ~MainMenu();
24 
29  bool input();
30 
34  void update();
35 
39  void draw();
40 
41 private:
43  std::string menuSprite;
45  std::string menuButtons[4];
49  float totalTime;
51  std::string backgroundMusicID;
52 };
Creates a State object to be inherited.
Definition: State.h:13
bool initialLoop
A boolean for the inital loop.
Definition: MainMenu.h:47
Creates a StateManager object.
Definition: StateManager.h:9
StateManager * stateManager
A pointer to the state manager.
Definition: State.h:64
float totalTime
The total running time.
Definition: MainMenu.h:49
std::string menuButtons[4]
The menu buttons.
Definition: MainMenu.h:45
SDL_Window * window
The window to display to.
Definition: State.h:66
bool input()
Handles the State input.
Definition: MainMenu.cpp:66
std::string menuSprite
The menu sprite.
Definition: MainMenu.h:43
void draw()
A function to draw the State to the screen.
Definition: MainMenu.cpp:161
std::string backgroundMusicID
The background music ID.
Definition: MainMenu.h:51
A State that contains and runs the Main Menu.
Definition: MainMenu.h:10
~MainMenu()
Destructs the State object.
Definition: MainMenu.cpp:58
void update()
A function to update the State.
Definition: MainMenu.cpp:124
MainMenu(StateManager *stateManager, SDL_Window *window)
Constructs the State object.
Definition: MainMenu.cpp:17