nsnake
Classic snake game for the terminal
Loading...
Searching...
No Matches
GameStateMainMenu.hpp
1#ifndef GAMESTATEMAINMENU_H_DEFINED
2#define GAMESTATEMAINMENU_H_DEFINED
3
4#include <Flow/GameState.hpp>
5#include <Interface/LayoutMainMenu.hpp>
6#include <Interface/Menu/Menu.hpp>
7#include <Interface/Menu/MenuAlphabetic.hpp>
8#include <Interface/WindowGameHelp.hpp>
9
13{
14 friend class LayoutMainMenu;
15
16public:
18 virtual ~GameStateMainMenu() { };
19
20 void load(int stack=0);
21
26 int unload();
27
29
30 void draw();
31
32private:
33 LayoutMainMenu* layout;
34
36 Menu* menu;
37
38 MenuAlphabetic* menuLevels;
39 bool menuLevelsActivated;
40
41 Menu* menuGameSettings;
42 bool menuGameSettingsActivated;
43
44 Menu* menuGUIOptions;
45 bool menuGUIOptionsActivated;
46
47 Menu* menuControls;
48 bool menuControlsActivated;
49
50 WindowGameHelp* helpWindows;
51
52 // easily create internal menus
53 void createMainMenu();
54 void createGameSettingsMenu();
55 void createLevelsMenu();
56 void createGUIOptionsMenu();
57 void createControlsMenu();
58 void saveSettingsMenuGUIOptions();
59 void saveSettingsMenuGameSettings();
60};
61
62#endif //GAMESTATEMAINMENU_H_DEFINED
63
GameState::StateCode update()
Called every frame, where states calculate everything that can change.
void load(int stack=0)
Where every state initializes it's resources.
void draw()
Called every frame, where states draw stuff on screen.
int unload()
Gets called when we're leaving this menu.
Abstract definition of a game state.
Definition GameState.hpp:32
StateCode
All possible transitions between states.
Definition GameState.hpp:40
How we show the screen at GameStateMainMenu.
Menu on which its items are always sorted alphabetically.
List of selectable items.
Definition Menu.hpp:29
Specific Window that shows Help and other info during Game.