TutorialWindow
#include "GUI/Elements/Windows/TutorialWindow.h"
Inherits from IWindow, ITutorialRenderer, std::enable_shared_from_this< IWindow >
Public Functions
Name | |
---|---|
TutorialWindow(bool show) | |
void | emptyTutorial() |
bool | hasTutorial() const |
virtual void | render() override<br>Renders the tutorial window using ImGui. |
void | setStep(int step_number)<br>Sets which step of currently set tutorial should be shown. |
void | setTutorial(std::shared_ptr< Tutorial > tutorial)<br>Sets the passed tutorial as the current one. |
void | setTutorial(std::shared_ptr< TutorialHeader > & header)<br>Calls load and parse for a tutorial from file and sets it as the current one to be shown. |
void | setTutorial(std::string path)<br>Calls load and parse for a tutorial from file and sets it as the current one to be shown. |
Additional inherited members
Public Functions inherited from IWindow
Name | |
---|---|
IWindow(bool show =false) | |
virtual | ~IWindow() =default |
virtual const char * | getID() const =0 |
InputController & | getInput()<br>Returns window input controller. |
InputController * | getInputPtr() |
const char * | getName() const |
bool * | getShowPtr() |
void | hide() |
bool | isVisible() const |
const std::string & | setName(const char * name) |
void | show() |
Protected Functions inherited from IWindow
Name | |
---|---|
void | updateWindowInfo()<br>Collect information about the current window. |
Public Attributes inherited from IWindow
Name | |
---|---|
glm::vec2 | m_windowMax <br>Bottom right corner of the window. |
glm::vec2 | m_windowMin <br>Top left corner of the window, same as m_windowPos (separate variable for clarity) |
glm::vec2 | m_windowPos <br>Top-left corner of the window in screen coordinates. |
glm::ivec2 | m_windowSize <br>Window width and height dimensions. |
Protected Attributes inherited from IWindow
Name | |
---|---|
std::string | imGuiName |
InputController | Input |
bool | m_show |
WindowManager * | m_windowManager <br>Weak reference to a WindowManager set when this window is added to it. |
Friends inherited from IWindow
Name | |
---|---|
class | WindowManager |
Public Functions inherited from ITutorialRenderer
Name | |
---|---|
virtual | ~ITutorialRenderer() =default |
Public Functions Documentation
function TutorialWindow
TutorialWindow(
bool show
)
TutorialWindow(
bool show
)
function emptyTutorial
void emptyTutorial()
void emptyTutorial()
function hasTutorial
bool hasTutorial() const
bool hasTutorial() const
function render
virtual void render() override
virtual void render() override
Renders the tutorial window using ImGui.
Reimplements: IWindow::render
function setStep
void setStep(
int step_number
)
void setStep(
int step_number
)
Sets which step of currently set tutorial should be shown.
Parameters:
- step_number A step number counted from 0.
Return: true if successful, false if number out of range or no currently set tutorial
function setTutorial
void setTutorial(
std::shared_ptr< Tutorial > tutorial
)
void setTutorial(
std::shared_ptr< Tutorial > tutorial
)
Sets the passed tutorial as the current one.
Parameters:
- tutorial Ptr to an already loaded tutorial
function setTutorial
void setTutorial(
std::shared_ptr< TutorialHeader > & header
)
void setTutorial(
std::shared_ptr< TutorialHeader > & header
)
Calls load and parse for a tutorial from file and sets it as the current one to be shown.
Parameters:
- header Ptr to an already loaded tutorial header object describing a specific tutorial.
function setTutorial
void setTutorial(
std::string path
)
void setTutorial(
std::string path
)
Calls load and parse for a tutorial from file and sets it as the current one to be shown.
Parameters:
- path Path to the .tut file to be loaded. All dependent files (such as pictures) should lie in the same folder.
Updated on 2024-03-16 at 19:15:00 +0000