-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainMenuState.h
More file actions
49 lines (33 loc) · 871 Bytes
/
MainMenuState.h
File metadata and controls
49 lines (33 loc) · 871 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
47
48
#pragma once
#include "GameState.h"
class MainMenuState :
public State
{
private:
// private: Variables:
sf::Texture backgroundTexture;
sf::RectangleShape background;
sf::RectangleShape container;
sf::Font font;
bool shutDown;
bool start;
sf::Clock fadeTimer;
float fadeTimerMax;
std::map<std::string, gui::Button*> buttons;
// private: Functions:
void initVariables();
void initBackground(const std::string file_path);
void initGui();
void initSound();
void resetGui();
public:
// Constructors and Destructor:
MainMenuState(StateData* state_data, gui::FadeScreen* fade_screen, sfx::SoundEngine* sound_engine);
~MainMenuState();
// Functions:
void updateInput(const float& dt);
void updateButtons(const float& dt);
void update(const float& dt);
void renderButtons(sf::RenderTarget* target);
void render(sf::RenderTarget* target);
};