Skip to content

TutorialManager ​

#include "Tutorial/TutorialManager.h"

Inherits from Singleton< TutorialManager >

Public Types ​

Name
using std::vector< std::shared_ptr< TutorialHeader > >UTutorialHeaders

Public Functions ​

Name
std::shared_ptr< TutorialHeader >findTutorialHeader(const std::string & tutorialName)<br>Finds existing tutorial header by its filename.
ETutorialLanguagegetLanguage() const
intgetStep() const
Ptr< Tutorial > &getTutorial()
const UTutorialHeaders &getTutorialHeaders() const
voidreloadTutorials()<br>searches through the tutorial directory and adds all found tutorial files to the window.
voidsetLanguage(ETutorialLanguage language)
voidsetStep(int stepNumber)<br>Sets which step of currently set tutorial should be shown.
voidsetTutorial(Ptr< Tutorial > tutorial)
voidtoggleLanguage()<br>Switches the language between Czech and English and reloads the tutorials.

Additional inherited members ​

Public Functions inherited from Singleton< TutorialManager >

Name
T &instance()

Public Types Documentation ​

using UTutorialHeaders ​

cpp
using TutorialManager::UTutorialHeaders =  std::vector<std::shared_ptr<TutorialHeader> >;

Public Functions Documentation ​

function findTutorialHeader ​

cpp
std::shared_ptr< TutorialHeader > findTutorialHeader(
    const std::string & tutorialName
)

Finds existing tutorial header by its filename.

function getLanguage ​

cpp
inline ETutorialLanguage getLanguage() const

function getStep ​

cpp
inline int getStep() const

function getTutorial ​

cpp
inline Ptr< Tutorial > & getTutorial()

function getTutorialHeaders ​

cpp
inline const UTutorialHeaders & getTutorialHeaders() const

function reloadTutorials ​

cpp
void reloadTutorials()

searches through the tutorial directory and adds all found tutorial files to the window.

Todo: Use language enum or locale string.

function setLanguage ​

cpp
void setLanguage(
    ETutorialLanguage language
)

function setStep ​

cpp
void setStep(
    int stepNumber
)

Sets which step of currently set tutorial should be shown.

Parameters:

  • stepNumber A step number counted from 0.

Return: true if successful, false if number out of range or no currently set tutorial

function setTutorial ​

cpp
void setTutorial(
    Ptr< Tutorial > tutorial
)

function toggleLanguage ​

cpp
void toggleLanguage()

Switches the language between Czech and English and reloads the tutorials.


Updated on 2026-09-11 at 21:24:24 +0000