-
Notifications
You must be signed in to change notification settings - Fork 0
/
Menu.h
85 lines (81 loc) · 2.05 KB
/
Menu.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef SNAKEOLD_MENU_H
#define SNAKEOLD_MENU_H
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <string>
#include "Highscore.h"
enum GameMode {CREATIVE,BASIC};
class Menu {
Highscore &score;
///// MAIN MENU
sf::Texture mainMenu;
sf::Texture playButtonON;
sf::Texture playButtonOFF;
sf::Texture hscoresButtonON;
sf::Texture hscoresButtonOFF;
///// RETURN BUTTON
sf::Texture returnOFF;
sf::Texture returnON;
///// GAME MODES
sf::Texture basic;
sf::Texture creative;
///// CHOOSE
sf::Texture choosefruit;
sf::Texture choosefence;
sf::Texture chooseobst;
///// PLAY
sf::Texture clean;
sf::Texture snakeOFF;
sf::Texture snakeON;
GameMode mode;
///// SPRITES
sf::Sprite sprites[10];
sf::Sprite play[2];
sf::Sprite choices[3];
sf::Sprite snakes[2];
sf::Sprite icons[3];
///// SKINS CHOOSEN
std::string fruitSkin;
std::string fenceSkin;
std::string obstacleSkin;
////// SKINS PACK
sf::Texture fruits[10];
sf::Texture fences[10];
sf::Texture obstacles[10];
sf::Sprite items[10];
////// HIGHSCORES
sf::Texture medals[3];
sf::Texture ranking;
sf::Sprite showhighscores[4];
std::string point[10];
sf::Text points[10];
std::string timemin[10];
sf::Text timemins[10];
std::string timesec[10];
sf::Text timesecs[10];
std::string snake[10];
sf::Text snakesize[10];
sf::Text infos[4];
sf::Text places[7];
sf::Texture browseOFF;
sf::Texture browseON;
sf::Texture browseOFF2;
sf::Texture browseON2;
sf::Sprite browser[2];
///// AUDIO & TEXT
sf::SoundBuffer click;
sf::Sound sound;
sf::Font font;
sf::Text texts[10];
void setSkin(std::string what, std::string which);
void format();
public:
Menu(Highscore &s);
void showMenu();
////////// RETURNING SECTION
std::string getFruitSkin() const;
std::string getFenceSkin() const;
std::string getObstacleSkin() const;
GameMode getGameMode() const;
};
#endif //SNAKEOLD_MENU_H