-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainMenuState.h
50 lines (34 loc) · 975 Bytes
/
MainMenuState.h
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
49
#pragma once
#include "GameState.h"
#include "SettingsState.h"
#include "EditorState.h"
class MainMenuState :
public State
{
private:
//private: Variables:
sf::Texture backgroundTexture;
sf::RectangleShape background;
sf::RectangleShape container;
sf::Font font;
sf::Font systemFont;
std::map<std::string, gui::Button*> buttons;
//private: Functions:
//Initialization funtcions:
void initVariables();
void initBackground(const std::string file_path);
void initGui();
//Clears the GUI elements and reinitializes the GUI.
//@return void
void resetGui();
public:
//Constructor and Destructor:
MainMenuState(StateData* state_data);
virtual ~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 = nullptr);
};