-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.h
More file actions
65 lines (47 loc) · 1.09 KB
/
Menu.h
File metadata and controls
65 lines (47 loc) · 1.09 KB
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
#ifndef MENU_H
#define MENU_H
#include "GameState.h"
#include "Editor.h"
class CMenuState : public CGameState
{
public:
void Init(CGameEngine* game);
void Cleanup();
void Pause();
void Resume(CGameEngine* game);
void HandleEvents(CGameEngine* game);
void Update(CGameEngine* game);
void Draw(CGameEngine* game);
static CMenuState* Instance() {
return &m_MenuState;
}
protected:
CMenuState() { }
private:
static CMenuState m_MenuState;
enum Selection { sel_resume, sel_new, sel_load, sel_save, sel_quit };
void UpdateArrowPosition();
//sf::RenderWindow window;
sf::View view;
bool savingEnabled = false;
bool waiting_for_input = false;
std::string input_str = "maps/";
Selection selection;
int text_top = 500;
int line_top = 730;
sf::Texture logo_texture;
sf::Sprite logo_sprite;
sf::Font font;
sf::Text text_sub;
sf::Text text_resume;
sf::Text text_new;
sf::Text text_load;
sf::Text text_save;
sf::Text text_quit;
sf::Text arrow;
sf::Text text_field_label;
sf::Text text_field;
//sf::Vertex input_line[];
sf::CircleShape circle;
};
#endif // MENU_H