-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenreState.h
47 lines (34 loc) · 860 Bytes
/
GenreState.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
#pragma once
#include "State.h"
#include "Button.h"
#include<iostream>
#include<fstream>
class GenreState :
public State
{
private:
sf::Font font;
std::map<std::string, Button*> buttons;
sf::Text text1;
sf::Text text2;
std::fstream file;
sf::Texture GenreTexture;
sf::Sprite GenreSprite;
//sf::RectangleShape background;
void initFonts();
protected:
public:
GenreState(sf::RenderWindow* window, std::stack<State*>* states);
virtual ~GenreState();
//file
//functions
void initButtons();
void updateButtons();
void renderButtons(sf::RenderTarget* target);
void initText();
void renderText(sf::RenderTarget *target);
void endState();
void updateInput(const float& dt);
void update(const float& dt);
void render(sf::RenderTarget* target = NULL);
};