From 0b5b69d76e47730210e319c5cf40224067bf1c7b Mon Sep 17 00:00:00 2001 From: maj00r Date: Sun, 4 Oct 2026 02:05:31 +0200 Subject: [PATCH] Structure gauge button in the Track tab of the toolset --- application/editoruilayer.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/application/editoruilayer.cpp b/application/editoruilayer.cpp index a4c10e01..b5484724 100644 --- a/application/editoruilayer.cpp +++ b/application/editoruilayer.cpp @@ -86,6 +86,18 @@ void editor_ui::render_mode_options(nodebank_panel::edit_mode const Mode) m_filloptions(); break; case nodebank_panel::TRACK: + if (m_gaugewindow != nullptr) + { + auto const open{*m_gaugewindow}; + if (open) + ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive)); + if (ImGui::Button(STR_C("Structure gauge"), ImVec2(-1.0f, 0.0f))) + *m_gaugewindow = false == *m_gaugewindow; + if (open) + ImGui::PopStyleColor(); + if (ImGui::IsItemHovered()) + ImGui::SetTooltip("%s", STR_C("Checks which models enter the structure gauge of the tracks and the clearance over the roads (skrajnia budowli)")); + } if (m_trackoptions) m_trackoptions(); break; @@ -96,18 +108,6 @@ void editor_ui::render_mode_options(nodebank_panel::edit_mode const Mode) void editor_ui::render_header_sections() { - if (m_gaugewindow != nullptr) - { - auto const open{*m_gaugewindow}; - if (open) - ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive)); - if (ImGui::Button(STR_C("Structure gauge"), ImVec2(-1.0f, 0.0f))) - *m_gaugewindow = false == *m_gaugewindow; - if (open) - ImGui::PopStyleColor(); - if (ImGui::IsItemHovered()) - ImGui::SetTooltip("%s", STR_C("Checks which models enter the structure gauge of the tracks and the clearance over the roads (skrajnia budowli)")); - } if (ImGui::CollapsingHeader("Gizmo", ImGuiTreeNodeFlags_DefaultOpen)) { if (m_gizmooptions)