nsnake
Classic snake game for the terminal
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 
43 
44  Window* logo;
45  Window* menu;
46  Window* animationwin;
47 
50 };
51 
52 #endif //LAYOUTMAINMENU_H_DEFINED
53 
Animation * animation
Cure thing at the main menu.
A segment of the terminal screen (2D char matrix).
Definition: Window.hpp:16
GameStateMainMenu * state
We need this so we can access the states&#39; flags and decide best on how to print it.
List of selectable items.
Definition: Menu.hpp:28
How we show the screen at GameStateMainMenu.
Abstract interface to any kind of Animation.
Definition: Animation.hpp:7
void draw(Menu *menu)
Shows the Main Menu screen, along with drawing #menu.
void redraw()
Redraws everything from scratch, refreshing borders and stuff.
Interface for how the things are shown on the screen.
Definition: Layout.hpp:15