-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainMenuState.h
More file actions
43 lines (34 loc) · 952 Bytes
/
Copy pathMainMenuState.h
File metadata and controls
43 lines (34 loc) · 952 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
#pragma once
#include "GameState.h"
#include "HowtoPlayState.h"
#include "GUI.h"
#include "pFirefly.h"
class MainMenuState : public State
{
private:
//variables
sf::RectangleShape background;
sf::Texture backgroundTexture;
sf::Font font;
pFirefly *pfirefly;
std::map<std::string, gui::ButtonForMainmenu*> buttons;
//bgm & sound stuff
sf::Music bgm;
//functions
void initVariable();
void initBackground();
void initFonts();
void initKeybinds();
void initButtons();
void initBGM();
public:
MainMenuState(sf::RenderWindow* window, std::map<std::string, int>* supportedKeys, std::stack<State*>* states);
virtual ~MainMenuState();
//functions
void UpdateInput(const float& deltaTime);
void UpdateBTN();
void UpdateBGM();
void Update(const float& deltaTime);
void RenderBTN(sf::RenderTarget& target);
void Render(sf::RenderTarget* target = nullptr);
};