-
Notifications
You must be signed in to change notification settings - Fork 0
/
Menu.h
41 lines (35 loc) · 918 Bytes
/
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
#ifndef MENU_H_
#define MENU_H_
// #include "Version.h"
#include "GameDefinitions.h"
#include "MenuItem.h"
#include <string>
#include <functional>
class Text;
class MenuItem;
class Menu {
public:
Menu();
~Menu();
void Exit();
void Init();
void Render();
GameDefinitions::GameStateEnum KeyInput(int key, bool action);
private:
void InitMenuItems();
void NextMenuItem();
void PreviousMenuItem();
GameDefinitions::GameStateEnum InvokeMenuItem();
GameDefinitions::GameStateEnum ActionNewGame();
GameDefinitions::GameStateEnum ActionContinue();
GameDefinitions::GameStateEnum ActionSettings();
GameDefinitions::GameStateEnum ActionQuit();
private:
Text * text_;
MenuItem * menu_items_[GameDefinitions::menuItem_SIZE];
GameDefinitions::MenuItemEnum selected_item_;
int screen_width_;
int screen_height_;
bool quit_;
};
#endif // MENU_H_