18using namespace std::literals;
25 ImGui::TextLinkOpenURL(
"FAQ",
strCat(
"file://", docDir,
"/manual/faq.html").c_str());
26 ImGui::TextLinkOpenURL(
"Setup Guide",
strCat(
"file://", docDir,
"/manual/setup.html").c_str());
27 ImGui::TextLinkOpenURL(
"User Manual",
strCat(
"file://", docDir,
"/manual/user.html").c_str());
29 ImGui::MenuItem(
"Dear ImGui user guide",
nullptr, &showImGuiUserGuide);
31 ImGui::Checkbox(
"ImGui Demo Window", &showDemoWindow);
33 "This is purely to demonstrate the ImGui capabilities\n"
34 "and can sometimes help to diagnose problems.\n"
35 "There is no connection with any openMSX functionality.");
37 ImGui::MenuItem(
"About openMSX",
nullptr, &showAboutOpenMSX);
38 ImGui::MenuItem(
"About Dear ImGui",
nullptr, &showAboutImGui);
44 if (showAboutOpenMSX) paintAbout();
45 if (showAboutImGui) ImGui::ShowAboutWindow(&showAboutImGui);
46 if (showImGuiUserGuide) {
47 im::Window(
"Dear ImGui User Guide", &showImGuiUserGuide, [&]{
48 ImGui::ShowUserGuide();
52 ImGui::ShowDemoWindow(&showDemoWindow);
56void ImGuiHelp::paintAbout()
58 im::Window(
"About openMSX", &showAboutOpenMSX, [&]{
63 auto r = context.resolve(
"icons/openMSX-logo-256.png");
72 if (logo->texture.get()) {
73 ImGui::Image(logo->texture.getImGui(), logo->size);
79 im::Table(
"##table", 2, ImGuiTableFlags_SizingFixedFit, [&]{
98 ImGui::TextLinkOpenURL(
"openMSX.org",
"https://openmsx.org");
void paint(MSXMotherBoard *motherBoard) override
void showMenu(MSXMotherBoard *motherBoard) override
static std::string full()
static const char *const COPYRIGHT
void TextUnformatted(const std::string &str)
void Table(const char *str_id, int column, ImGuiTableFlags flags, const ImVec2 &outer_size, float inner_width, std::invocable<> auto next)
void Window(const char *name, bool *p_open, ImGuiWindowFlags flags, std::invocable<> auto next)
bool Menu(const char *label, bool enabled, std::invocable<> auto next)
void Group(std::invocable<> auto next)
const string & getSystemDocDir()
Get system doc directory.
This file implemented 3 utility functions:
const FileContext & systemFileContext()
gl::Texture loadTexture(const std::string &filename, ivec2 &size)
void HelpMarker(std::string_view desc)