-
Notifications
You must be signed in to change notification settings - Fork 0
/
scores_state.h
47 lines (33 loc) · 948 Bytes
/
scores_state.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
#ifndef SCORES_STATE_H
#define SCORES_STATE_H
#include "game_state.h"
extern const size_t TITLE_SIZE;
extern const size_t SUBTITLE_SIZE;
extern const size_t BODY_TEXT_SIZE;
extern const float TITLE_POSITION_X;
extern const float TITLE_POSITION_Y;
extern const float PLAYER_SUBTITLE_POS_X;
extern const float PLAYER_SUBTITLE_POS_Y;
extern const float MARGIN_TOP;
extern const float MARGIN_LEFT;
namespace ScoreStateNames {
extern const std::string Title;
extern const std::string Player;
extern const std::string Score;
extern const std::string BackToMain;
}
class ScoresState : public GameState {
public:
ScoresState(Game *state_holder);
void render();
void update();
void processEvents();
private:
sf::Sprite backgroundSprite;
sf::Text title;
sf::Text player_title;
sf::Text scores_title;
sf::Text back_to_main;
std::vector<std::pair<sf::Text, sf::Text>> highscores;
};
#endif