-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettingsState.h
57 lines (36 loc) · 1.03 KB
/
SettingsState.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
50
51
52
53
54
55
56
#pragma once
#include "State.h"
class SettingsState :
public State
{
private:
//private: Variables:
sf::Texture backgroundTexture;
sf::RectangleShape background;
sf::RectangleShape container;
sf::Font font;
sf::Font settingsFont;
std::map<std::string, gui::Button*> buttons;
std::map<std::string, gui::DropDownList*> dropDownLists;
sf::Text optionsText[4];
std::vector<sf::VideoMode> modes;
//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:
//Constructirs and Destructor:
SettingsState(StateData* state_data);
virtual ~SettingsState();
//Accessors:
//Fucntions:
void updateInput(const float& dt);
void updateGui(const float& dt);
void update(const float& dt);
void renderGui(sf::RenderTarget& target);
void render(sf::RenderTarget* target = nullptr);
};