Creates an MainMenu object that inherits State and runs the MainMenu. More...
#include <MainMenu.h>
Public Member Functions | |
MainMenu (StateManager *stateManager, SDL_Window *window, int screenWidth, int screenHeight) | |
~MainMenu () | |
bool | input () |
void | update (float dt) |
void | draw () |
Public Member Functions inherited from State | |
State (StateManager *stateManager, SDL_Window *window, int screenWidth, int screenHeight) | |
virtual | ~State () |
SDL_Window * | getWindow () |
Private Member Functions | |
void | loadingScreen () |
Private Attributes | |
std::unordered_map < std::string, Object * > | objects |
std::unordered_map < std::string, Shader * > | shaders |
Audio * | music |
MenuEntity * | sam |
Camera * | camera |
MainMenuUI * | userInterface |
glm::vec2 | mouse |
int | playKey |
int | credKey |
int | exitKey |
int | pressed |
std::vector< ParticleEffect * > | particleEffects |
Additional Inherited Members | |
Protected Attributes inherited from State | |
StateManager * | stateManager |
SDL_Window * | window |
int | screenWidth |
int | screenHeight |
MainMenu::MainMenu | ( | StateManager * | stateManager, |
SDL_Window * | window, | ||
int | screenWidth, | ||
int | screenHeight | ||
) |
Constructs a MainMenu object.
stateManager | A pointer to the StateManager. |
window | A pointer to the window. |
screenWidth | The screen width. |
screenHeight | The screen height. |
MainMenu::~MainMenu | ( | ) |
|
virtual |
|
virtual |
|
private |
Draws a LoadingScreen.
|
virtual |
|
private |
|
private |
|
private |
Current Mouse position
|
private |
The background music
|
private |
The loaded Object files
|
private |
The ParticleEffects for the main menu
|
private |
variables for if menu keys are highlighted, can be 0 or 1
|
private |
which key is pressed, 0 for none
|
private |
The Entities
|
private |
The loaded Shader files
|
private |
The MainMenuUI