aboutsummaryrefslogtreecommitdiffstats
path: root/source/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/main.cpp')
-rw-r--r--source/main.cpp36
1 files changed, 4 insertions, 32 deletions
diff --git a/source/main.cpp b/source/main.cpp
index b5514e4..aa9f7c4 100644
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -37,6 +37,8 @@ bool guiInitialize();
bool guiHandleEvents();
void guiShutdown();
void guiRender();
+void helpRenderMenu();
+void helpRenderDialog();
void log(const std::string& str);
@@ -90,8 +92,6 @@ void log(const std::string& str)
template<bool first>
void renderWindow()
{
- static bool showHelp = false;
-
// Start the new window frame and render the menu bar.
ImGui_ImplOpenGL2_NewFrame();
ImGui_ImplSDL2_NewFrame();
@@ -101,24 +101,7 @@ void renderWindow()
fileRenderMenu();
deviceRenderMenu();
codeRenderMenu();
-
- if (ImGui::BeginMenu("Help")) {
- if (ImGui::MenuItem("Open wiki...")) {
-#ifdef STMDSP_WIN32
- system("start "
-#else
- system("xdg-open "
-#endif
- "https://code.bitgloo.com/clyne/stmdspgui/wiki");
- }
-
- ImGui::Separator();
- if (ImGui::MenuItem("About")) {
- showHelp = true;
- }
-
- ImGui::EndMenu();
- }
+ helpRenderMenu();
ImGui::EndMainMenuBar();
}
@@ -142,6 +125,7 @@ void renderWindow()
codeRenderToolbar();
deviceRenderToolbar();
fileRenderDialog();
+ helpRenderDialog();
deviceRenderWidgets();
ImGui::PopFont();
@@ -160,18 +144,6 @@ void renderWindow()
deviceRenderDraw();
- if (showHelp) {
- ImGui::Begin("help");
-
- ImGui::Text("stmdspgui\nCompiled on " __DATE__ ".\n\nWritten by Clyne Sullivan.\n");
-
- if (ImGui::Button("Close")) {
- showHelp = false;
- }
-
- ImGui::End();
- }
-
// Draw everything to the screen.
guiRender();
}