mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
impr: Allow tutorials to use markdown formatted text
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
#include <hex/api/tutorial_manager.hpp>
|
||||
#include <ui/markdown.hpp>
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
void registerIntroductionTutorial();
|
||||
|
||||
void registerTutorials() {
|
||||
TutorialManager::setRenderer([](const std::string &message) {
|
||||
return [markdown = std::make_shared<ui::Markdown>(message)] {
|
||||
markdown->draw();
|
||||
};
|
||||
});
|
||||
|
||||
registerIntroductionTutorial();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,11 @@ namespace hex::ui {
|
||||
public:
|
||||
Markdown() = default;
|
||||
Markdown(const std::string &text);
|
||||
Markdown(const Markdown &) = delete;
|
||||
Markdown(Markdown &&other) = default;
|
||||
|
||||
Markdown &operator=(const Markdown &) = delete;
|
||||
Markdown &operator=(Markdown &&other) = default;
|
||||
|
||||
void draw();
|
||||
void reset();
|
||||
|
||||
Reference in New Issue
Block a user