nsnake
Classic snake game for the terminal
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Flow
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
12
class
GameStateMainMenu:
public
GameState
13
{
14
friend
class
LayoutMainMenu;
15
16
public
:
17
GameStateMainMenu();
18
virtual
~GameStateMainMenu() { };
19
20
void
load
(
int
stack=0);
21
26
int
unload
();
27
28
GameState::StateCode
update
();
29
30
void
draw
();
31
32
private
:
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
GameStateMainMenu::update
GameState::StateCode update()
Called every frame, where states calculate everything that can change.
Definition
GameStateMainMenu.cpp:101
GameStateMainMenu::load
void load(int stack=0)
Where every state initializes it's resources.
Definition
GameStateMainMenu.cpp:71
GameStateMainMenu::draw
void draw()
Called every frame, where states draw stuff on screen.
Definition
GameStateMainMenu.cpp:320
GameStateMainMenu::unload
int unload()
Gets called when we're leaving this menu.
Definition
GameStateMainMenu.cpp:86
GameState
Abstract definition of a game state.
Definition
GameState.hpp:32
GameState::StateCode
StateCode
All possible transitions between states.
Definition
GameState.hpp:40
MenuAlphabetic
Menu on which its items are always sorted alphabetically.
Definition
MenuAlphabetic.hpp:12
Menu
List of selectable items.
Definition
Menu.hpp:29
WindowGameHelp
Specific Window that shows Help and other info during Game.
Definition
WindowGameHelp.hpp:12
Generated on
for nsnake by
1.17.0