From dff847ff4455e7b8c5123167a7d01afe7c45f585 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 24 May 2022 21:00:16 -1200 Subject: built-in openocd support --- source/main.cpp | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) (limited to 'source/main.cpp') 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 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(); } -- cgit v1.2.3