From 6754c406d336eabe479b9732d401edc95a39f491 Mon Sep 17 00:00:00 2001 From: Sara Gerretsen Date: Thu, 4 Sep 2025 21:25:10 +0200 Subject: [PATCH] feat: expanded template demo logic --- src/CHANGEME.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/CHANGEME.cpp b/src/CHANGEME.cpp index 8751fe9..85a5c7f 100644 --- a/src/CHANGEME.cpp +++ b/src/CHANGEME.cpp @@ -25,12 +25,31 @@ void loop() { void draw_scene(sf::RenderTarget &target) { } +static bool dockspace = true; + +void draw_main_menu_bar() { + if (ImGui::BeginMenu("Edit")) { + if (ImGui::MenuItem("Dockspace?")) { + dockspace = !dockspace; + } + ImGui::EndMenu(); + } +} + void draw_gui() { // draw your GUI - if (ImGui::Begin("MyWindow")) { + if (dockspace) { + ImGui::DockSpaceOverViewport(0, NULL, ImGuiDockNodeFlags_PassthruCentralNode); + } + if (ImGui::Begin("My Window")) { + ImGui::Text("A window with text and a button!!"); if (ImGui::Button("My Button")) { std::println("Yipeeee"); } ImGui::End(); } + if (ImGui::Begin("Second Window :O")) { + ImGui::Text("A window with text!"); + ImGui::End(); + } }