nsnake
Classic snake game for the terminal
Loading...
Searching...
No Matches
LayoutMainMenu Class Reference

How we show the screen at GameStateMainMenu. More...

#include <LayoutMainMenu.hpp>

Inheritance diagram for LayoutMainMenu:
Collaboration diagram for LayoutMainMenu:

Public Member Functions

 LayoutMainMenu (int width, int height, GameStateMainMenu *state)
 
void windowsInit ()
 
void windowsExit ()
 
void draw (Menu *menu)
 Shows the Main Menu screen, along with drawing menu.
 
void redraw ()
 Redraws everything from scratch, refreshing borders and stuff.
 
virtual void draw ()
 
- Public Member Functions inherited from Layout
 Layout (int width, int height)
 

Public Attributes

GameStateMainMenustate
 We need this so we can access the states' flags and decide best on how to print it.
 
Windowlogo
 
Windowmenu
 
Windowanimationwin
 
Animationanimation
 Cure thing at the main menu.
 
- Public Attributes inherited from Layout
Windowmain
 Layout's main Window, where all the others are inside.
 

Additional Inherited Members

- Static Public Attributes inherited from Layout
static int screenWidth = 0
 Full width of the terminal right now.
 
static int screenHeight = 0
 Full height of the terminal right now.
 

Detailed Description

How we show the screen at GameStateMainMenu.

This class is merely a wrapper over functions that print GameStateMainMenu on the screen.

Thus, it needs full access to it's internal values. So it comes down to this circular dependency.

Definition at line 20 of file LayoutMainMenu.hpp.

Constructor & Destructor Documentation

◆ LayoutMainMenu()

LayoutMainMenu::LayoutMainMenu ( int width,
int height,
GameStateMainMenu * state )

Definition at line 11 of file LayoutMainMenu.cpp.

◆ ~LayoutMainMenu()

LayoutMainMenu::~LayoutMainMenu ( )
virtual

Definition at line 21 of file LayoutMainMenu.cpp.

Member Function Documentation

◆ draw() [1/2]

void Layout::draw ( )
virtual

Reimplemented from Layout.

Definition at line 30 of file Layout.cpp.

◆ draw() [2/2]

void LayoutMainMenu::draw ( Menu * menu)

Shows the Main Menu screen, along with drawing menu.

Definition at line 71 of file LayoutMainMenu.cpp.

◆ windowsExit()

void LayoutMainMenu::windowsExit ( )
virtual

Reimplemented from Layout.

Definition at line 62 of file LayoutMainMenu.cpp.

◆ windowsInit()

void LayoutMainMenu::windowsInit ( )
virtual

Reimplemented from Layout.

Definition at line 25 of file LayoutMainMenu.cpp.

Member Data Documentation

◆ animation

Animation* LayoutMainMenu::animation

Cure thing at the main menu.

Definition at line 49 of file LayoutMainMenu.hpp.

◆ animationwin

Window* LayoutMainMenu::animationwin

Definition at line 46 of file LayoutMainMenu.hpp.

◆ logo

Window* LayoutMainMenu::logo

Definition at line 44 of file LayoutMainMenu.hpp.

◆ menu

Window* LayoutMainMenu::menu

Definition at line 45 of file LayoutMainMenu.hpp.

◆ state

GameStateMainMenu* LayoutMainMenu::state

We need this so we can access the states' flags and decide best on how to print it.

Definition at line 42 of file LayoutMainMenu.hpp.


The documentation for this class was generated from the following files: