Study Dungeon  1.0.0
A group project for COSC345
Public Member Functions
MainMenuScene Class Reference

The class for the the main menu ui. More...

#include <mainmenu_scene.h>

Inheritance diagram for MainMenuScene:
ConsoleUI::Scene

Public Member Functions

void setStaticDrawn (bool staticDrawn) override
 Sets the static drawn state of the scene. More...
 
 MainMenuScene (ConsoleUI::UIManager &uiManager, std::function< void()> openSettingsScene, std::function< void()> openHowToScene, std::function< void()> openBrowseDecks, std::function< void()> openEditDecks)
 Construct a new Main Menu Scene object. More...
 
void createMainMenu (std::function< void()> openSettingsScene, std::function< void()> openHowToScene, std::function< void()> openBrowseDecks, std::function< void()> openEditDecks)
 Create a Main Menu object. More...
 
void init () override
 Initialise the scene.
 
void update () override
 Actions to perform on events.
 
void render (std::shared_ptr< ConsoleUI::ConsoleWindow > window) override
 The scene objects to render. More...
 
void handleInput () override
 Input handler for the scene.
 
- Public Member Functions inherited from ConsoleUI::Scene
virtual ~Scene ()=default
 Destroy the Scene object.
 

Detailed Description

The class for the the main menu ui.

Constructor & Destructor Documentation

◆ MainMenuScene()

MainMenuScene::MainMenuScene ( ConsoleUI::UIManager uiManager,
std::function< void()>  openSettingsScene,
std::function< void()>  openHowToScene,
std::function< void()>  openBrowseDecks,
std::function< void()>  openEditDecks 
)

Construct a new Main Menu Scene object.

Parameters
uiManagerThe UI manager for the scene
openSettingsScenefunction that will link to the setting scene
openHowToScenefunction that will link the "how-to" scene
openBrowseDecksfunction that will link to the browse decks scene
openEditDecksfunctions that will link to the edit decks scene

Member Function Documentation

◆ createMainMenu()

void MainMenuScene::createMainMenu ( std::function< void()>  openSettingsScene,
std::function< void()>  openHowToScene,
std::function< void()>  openBrowseDecks,
std::function< void()>  openEditDecks 
)

Create a Main Menu object.

Parameters
openSettingsScenefunction that will link to the setting scene
openHowToScenefunction that will link the "how-to" scene
openBrowseDecksfunction that will link to the browse decks scene
openEditDecksfunctions that will link to the edit decks scene

◆ render()

void MainMenuScene::render ( std::shared_ptr< ConsoleUI::ConsoleWindow window)
overridevirtual

The scene objects to render.

Parameters
windowthe window UI to render in

Implements ConsoleUI::Scene.

◆ setStaticDrawn()

void MainMenuScene::setStaticDrawn ( bool  staticDrawn)
overridevirtual

Sets the static drawn state of the scene.

Parameters
staticDrawnBoolean indicating whether the static elements have been drawn.

Implements ConsoleUI::Scene.


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