feat: Added tutorials view

This commit is contained in:
WerWolv
2023-12-13 13:04:59 +01:00
parent 3bc5295eae
commit 92043a3d23
7 changed files with 128 additions and 0 deletions

View File

@@ -55,6 +55,16 @@ namespace hex {
}
const std::map<std::string, TutorialManager::Tutorial>& TutorialManager::getTutorials() {
return s_tutorials;
}
std::map<std::string, TutorialManager::Tutorial>::iterator TutorialManager::getCurrentTutorial() {
return s_currentTutorial;
}
TutorialManager::Tutorial& TutorialManager::createTutorial(const std::string& unlocalizedName, const std::string& unlocalizedDescription) {
return s_tutorials.try_emplace(unlocalizedName, Tutorial(unlocalizedName, unlocalizedDescription)).first->second;
}
@@ -228,6 +238,8 @@ namespace hex {
if (m_parent->m_currentStep != m_parent->m_steps.end())
m_parent->m_currentStep->addHighlights();
else
s_currentTutorial = s_tutorials.end();
}