-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainMenuState.h
More file actions
41 lines (32 loc) · 872 Bytes
/
MainMenuState.h
File metadata and controls
41 lines (32 loc) · 872 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
#pragma once
#define MAINMENUSTATE_H
#include "GameSetState.h"
class MainMenuState :
public State
{
private:
//Variables
sf::Texture backgroundTexture;
sf::Font font;
sf::RectangleShape background;
std::map<std::string, Button*> buttons;
short selectedIndex;
//Functions
void moveDown();
void moveUp();
void initVariables();
void initBackground();
void initMusic();
void initFonts();
void initKeyBinds();
void initButtons();
public:
MainMenuState(sf::RenderWindow* window, std::map<std::string, int>* supportedKeys, std::stack<State*>* states, sf::Event* sfEvent);
virtual ~MainMenuState();
//Functions
void updateInput(const float& dt);
void updateButtons();
void update(const float& dt);
void renderButtons(sf::RenderTarget* traget = nullptr);
void render(sf::RenderTarget* traget = nullptr);
};