17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-20 15:04:54 +02:00

feat(editor): a less crowded track editor and one choice of what the switch tool places

- the switch tool asks what to place: a switch, a slip switch, a crossing or a connection of tracks (crossover, double,
  scissors, ladder), with the templates and the options of that kind only and one line of how to place it with the mouse;
  the bar of hints says the same, the wheel keys of a connection included; panel in its own editormodeswitchtool.cpp
- templates are listed by their names, the lengths a and b and the rest of the label in the tooltip
- the panel of a selected switch shows its length, its type and its drive; the name, number, rail, kilometre and angle are
  under Details
- one toolbar: the tools are no longer drawn a second time down the edge of the view; the track tools show select, lay,
  plan, switch and parallel, the others behind More, which starts closed again (setting track_tools_all)
- the infrastructure tool has no button nor key
- the gizmo options start closed, the node bank isn't drawn in the track mode
- no drive models: said in plain words
- self-test switchkind
This commit is contained in:
maj00r
2026-10-18 01:47:06 +02:00
parent e52d8d6e84
commit 3ba22aae10
16 changed files with 385 additions and 170 deletions

View File

@@ -104,7 +104,7 @@ bool editorSettings::load()
parse(value, m_palette);
else if (key == "first_steps")
m_first_steps = (value == "1");
else if (key == "track_tools_more")
else if (key == "track_tools_all")
m_track_tools_more = (value == "1");
else if (key.rfind(origin_prefix, 0) == 0)
{
@@ -150,7 +150,7 @@ bool editorSettings::save()
stream << "nodebank_card " << m_nodebank_card << "\n";
stream << "colours " << m_palette << "\n";
stream << "first_steps " << (m_first_steps ? 1 : 0) << "\n";
stream << "track_tools_more " << (m_track_tools_more ? 1 : 0) << "\n";
stream << "track_tools_all " << (m_track_tools_more ? 1 : 0) << "\n";
stream << std::fixed << std::setprecision(3);
for (auto const &origin : m_orthophoto_origins)
stream << origin.first << " " << origin.second.first << ";" << origin.second.second << "\n";