mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-06 06:58:35 +01:00
Structure gauge button in the Track tab of the toolset
This commit is contained in:
@@ -86,6 +86,18 @@ void editor_ui::render_mode_options(nodebank_panel::edit_mode const Mode)
|
|||||||
m_filloptions();
|
m_filloptions();
|
||||||
break;
|
break;
|
||||||
case nodebank_panel::TRACK:
|
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)
|
if (m_trackoptions)
|
||||||
m_trackoptions();
|
m_trackoptions();
|
||||||
break;
|
break;
|
||||||
@@ -96,18 +108,6 @@ void editor_ui::render_mode_options(nodebank_panel::edit_mode const Mode)
|
|||||||
|
|
||||||
void editor_ui::render_header_sections()
|
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 (ImGui::CollapsingHeader("Gizmo", ImGuiTreeNodeFlags_DefaultOpen))
|
||||||
{
|
{
|
||||||
if (m_gizmooptions)
|
if (m_gizmooptions)
|
||||||
|
|||||||
Reference in New Issue
Block a user