tweak: removed docking toggle from main menu bar

This commit is contained in:
Sara Gerretsen 2025-09-04 22:19:54 +02:00
parent e1b7e97348
commit 7565529412

View file

@ -31,12 +31,10 @@ void draw_scene(sf::RenderTarget &target, sf::RenderStates const &states) {
target.draw(rect, n_states);
}
static bool dockspace = true;
void draw_main_menu_bar() {
if (ImGui::BeginMenu("Edit")) {
if (ImGui::MenuItem("Dockspace?")) {
dockspace = !dockspace;
if (ImGui::MenuItem("Menu item!")) {
std::println("Wahooo!!!");
}
ImGui::EndMenu();
}
@ -44,9 +42,7 @@ void draw_main_menu_bar() {
void draw_gui() {
// draw your GUI
if (dockspace) {
ImGui::DockSpaceOverViewport(0, NULL, ImGuiDockNodeFlags_PassthruCentralNode);
}
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")) {