nsnake
Classic snake game for the terminal
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Interface
LayoutMainMenu.hpp
1
#ifndef LAYOUTMAINMENU_H_DEFINED
2
#define LAYOUTMAINMENU_H_DEFINED
3
4
#include <Interface/Layout.hpp>
5
#include <Interface/Window.hpp>
6
#include <Interface/Menu/Menu.hpp>
7
#include <Interface/Animation/Animation.hpp>
8
9
// circular dependence on GameStateMainMenu
10
class
GameStateMainMenu
;
11
20
class
LayoutMainMenu:
public
Layout
21
{
22
public
:
23
// Telling the compiler (clang) that we're
24
// hiding the parent's virtual function
25
using
Layout::draw;
26
27
LayoutMainMenu(
int
width,
int
height,
GameStateMainMenu
*
state
);
28
virtual
~LayoutMainMenu();
29
30
void
windowsInit();
31
void
windowsExit();
32
34
void
draw
(
Menu
* menu);
35
38
void
redraw
();
39
42
GameStateMainMenu
*
state
;
43
44
Window
* logo;
45
Window
* menu;
46
Window
* animationwin;
47
49
Animation
*
animation
;
50
};
51
52
#endif
//LAYOUTMAINMENU_H_DEFINED
53
Animation
Abstract interface to any kind of Animation.
Definition
Animation.hpp:8
GameStateMainMenu
The Main Menu.
Definition
GameStateMainMenu.hpp:13
LayoutMainMenu::redraw
void redraw()
Redraws everything from scratch, refreshing borders and stuff.
LayoutMainMenu::draw
void draw(Menu *menu)
Shows the Main Menu screen, along with drawing menu.
Definition
LayoutMainMenu.cpp:71
LayoutMainMenu::animation
Animation * animation
Cure thing at the main menu.
Definition
LayoutMainMenu.hpp:49
LayoutMainMenu::state
GameStateMainMenu * state
We need this so we can access the states' flags and decide best on how to print it.
Definition
LayoutMainMenu.hpp:42
Menu
List of selectable items.
Definition
Menu.hpp:29
Window
A segment of the terminal screen (2D char matrix).
Definition
Window.hpp:17
Generated on
for nsnake by
1.17.0