Study Dungeon  1.0.0
A group project for COSC345
howto_scene.h
Go to the documentation of this file.
1 
11 #pragma once
12 #ifndef HOWTO_SCENE_H
13 #define HOWTO_SCENE_H
14 
15 #include "menu.h"
16 #include <functional>
17 #include <iostream>
18 #include <sstream>
19 #include <string>
20 
21 
27 {
28 public:
35  HowToScene(ConsoleUI::UIManager &uiManager, std::function<void()> goBack);
36 
41  void update() override;
49  void render(std::shared_ptr<ConsoleUI::ConsoleWindow> window) override;
50 
55  void init();
56 
61  void handleInput() override;
62 
67  void setStaticDrawn(bool staticDrawn) override;
68 
69 private:
70  ConsoleUI::UIManager &m_uiManager;
71  std::function<void()> m_goBack;
72  bool m_staticDrawn = false;
73 };
74 
75 #endif // HOWTO_SCENE_H
Defines a UI scene.
Definition: menu.h:629
Defines the UI manager.
Definition: menu.h:675
Class for a scene to show the program instructions.
Definition: howto_scene.h:27
void render(std::shared_ptr< ConsoleUI::ConsoleWindow > window) override
renders the scene on the console window
Definition: howto_scene.cpp:37
void update() override
function for continuous updates to the program state seperate from rendering and input handling
Definition: howto_scene.cpp:26
void init()
Initialise the scene.
Definition: howto_scene.cpp:21
void setStaticDrawn(bool staticDrawn) override
Sets the static drawn state of the scene.
Definition: howto_scene.cpp:31
HowToScene(ConsoleUI::UIManager &uiManager, std::function< void()> goBack)
Construct a new HowTo Scene object.
Definition: howto_scene.cpp:14
void handleInput() override
Handle the input for the scene.
Definition: howto_scene.cpp:97
Classes and functions for the UI system.