Level H Engine
|
A State that contains and runs the Main Menu. More...
#include <MainMenu.h>
Public Member Functions | |
MainMenu (StateManager *stateManager, SDL_Window *window) | |
Constructs the State object. More... | |
~MainMenu () | |
Destructs the State object. More... | |
bool | input () |
Handles the State input. More... | |
void | update () |
A function to update the State. More... | |
void | draw () |
A function to draw the State to the screen. More... | |
![]() | |
State (StateManager *stateManager, SDL_Window *window, std::string name) | |
Constructs a State object. More... | |
virtual | ~State () |
A virtual destructor for the State object. More... | |
SDL_Window * | getWindow () |
Gets the window. More... | |
std::string | getName () |
Gets the name of the state. More... | |
void | destroyState () |
A function to destroy all data in a state. More... | |
Private Attributes | |
std::string | menuSprite |
The menu sprite. More... | |
std::string | menuButtons [4] |
The menu buttons. More... | |
bool | initialLoop |
A boolean for the inital loop. More... | |
float | totalTime |
The total running time. More... | |
std::string | backgroundMusicID |
The background music ID. More... | |
Additional Inherited Members | |
![]() | |
StateManager * | stateManager |
A pointer to the state manager. More... | |
SDL_Window * | window |
The window to display to. More... | |
std::string | name |
The state name. More... | |
bool | destroyed |
A boolean for if the state is destroyed. More... | |
A State that contains and runs the Main Menu.
MainMenu::MainMenu | ( | StateManager * | stateManager, |
SDL_Window * | window | ||
) |
Constructs the State object.
stateManager | A pointer to the StateManager. |
window | A pointer to the window in use. |
MainMenu::~MainMenu | ( | ) |
|
virtual |
|
virtual |
|
virtual |
|
private |
The background music ID.
|
private |
A boolean for the inital loop.
|
private |
The menu buttons.
|
private |
The menu sprite.
|
private |
The total running time.