impr: Allow tutorials to use markdown formatted text

This commit is contained in:
WerWolv
2025-12-15 20:07:43 +01:00
parent 021c7e5fdb
commit 6b16f39be4
6 changed files with 72 additions and 14 deletions

View File

@@ -22,6 +22,8 @@ EXPORT_MODULE namespace hex {
Right = 8
};
using DrawFunction = std::function<void()>;
struct Tutorial {
Tutorial() = delete;
Tutorial(const UnlocalizedString &unlocalizedName, const UnlocalizedString &unlocalizedDescription) :
@@ -101,6 +103,7 @@ EXPORT_MODULE namespace hex {
std::vector<Highlight> m_highlights;
std::optional<Message> m_message;
std::function<void()> m_onAppear, m_onComplete;
DrawFunction m_drawFunction;
};
Step& addStep();
@@ -166,6 +169,8 @@ EXPORT_MODULE namespace hex {
*/
static void reset();
static void setRenderer(std::function<DrawFunction(const std::string &)> renderer);
private:
TutorialManager() = delete;