17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 02:49:19 +02:00

Structure gauge: G1/G2/GA/GB/GC installation gauges, road clearance, Toolset button

This commit is contained in:
maj00r
2026-10-04 02:00:43 +02:00
parent d57215877f
commit e4e3aad853
5 changed files with 212 additions and 78 deletions

View File

@@ -96,6 +96,18 @@ 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)
@@ -143,12 +155,6 @@ void editor_ui::render_menu_contents()
ImGui::MenuItem(STR_C("Include database"), nullptr, &m_includespanel.is_open);
ImGui::EndMenu();
}
if (m_gaugewindow != nullptr)
{
ImGui::MenuItem(STR_C("Structure gauge"), nullptr, m_gaugewindow);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("%s", STR_C("Checks which models enter the structure gauge of the tracks (skrajnia budowli)"));
}
}
void editor_ui::set_file_actions(std::function<void()> Save, std::function<void()> Export)