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. |
ETutorialLanguage | getLanguage() const |
int | getStep() const |
Ptr< Tutorial > & | getTutorial() |
const UTutorialHeaders & | getTutorialHeaders() const |
void | reloadTutorials()<br>searches through the tutorial directory and adds all found tutorial files to the window. |
void | setLanguage(ETutorialLanguage language) |
void | setStep(int stepNumber)<br>Sets which step of currently set tutorial should be shown. |
void | setTutorial(Ptr< Tutorial > tutorial) |
void | toggleLanguage()<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> >;
using TutorialManager::UTutorialHeaders = std::vector<std::shared_ptr<TutorialHeader> >;
Public Functions Documentation
function findTutorialHeader
cpp
std::shared_ptr< TutorialHeader > findTutorialHeader(
const std::string & tutorialName
)
std::shared_ptr< TutorialHeader > findTutorialHeader(
const std::string & tutorialName
)
Finds existing tutorial header by its filename.
function getLanguage
cpp
inline ETutorialLanguage getLanguage() const
inline ETutorialLanguage getLanguage() const
function getStep
cpp
inline int getStep() const
inline int getStep() const
function getTutorial
cpp
inline Ptr< Tutorial > & getTutorial()
inline Ptr< Tutorial > & getTutorial()
function getTutorialHeaders
cpp
inline const UTutorialHeaders & getTutorialHeaders() const
inline const UTutorialHeaders & getTutorialHeaders() const
function reloadTutorials
cpp
void reloadTutorials()
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
)
void setLanguage(
ETutorialLanguage language
)
function setStep
cpp
void setStep(
int stepNumber
)
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
)
void setTutorial(
Ptr< Tutorial > tutorial
)
function toggleLanguage
cpp
void toggleLanguage()
void toggleLanguage()
Switches the language between Czech and English and reloads the tutorials.
Updated on 2025-01-07 at 13:40:43 +0000