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

feat(editor): every switch laid in the editor gets the key frogs, a box in the Switch panel sets or clears it as one undo step; the editor rebuilds the tracks crossing a changed or removed one; self-test commands frog, crossings, frogkey and geomhash; Polish translation

This commit is contained in:
maj00r
2026-10-13 18:30:16 +02:00
parent 16672e81cc
commit a93ed67c58
5 changed files with 196 additions and 2 deletions

View File

@@ -1005,6 +1005,16 @@ void editor_mode::render_turnout_ui()
if (m_switch.drive >= 0 && ImGui::Button(STR_C("Put the drive by the switch")))
place_switch_drive(*track);
}
bool frogs{track->SwitchExtension->m_frogs};
if (ImGui::Checkbox(STR_C("Frog and check rails made from the rails"), &frogs))
{
auto const before{editor_track::capture(*track)};
track->SwitchExtension->m_frogs = frogs;
push_track_snapshot({{track, before}});
editor_track::commit_parameters(*track);
}
item_tooltip("Cuts the rails of the switch at its frog and lays wing rails and check rails, for rail profiles S60, UIC60 and S39.\n"
"Off for a switch whose include has its own model of them");
if (false == m_switch.status.empty())
ImGui::TextWrapped("%s", m_switch.status.c_str());
if (angle > 1e-6)