17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-03 01:30:16 +01:00

refactor(editor): the trainset is a tool of its own

The fourth tool out of editor_mode. The track under the cursor and the
first steps of the tutorial become types of their own, which the editor
gives to the tools, and a tool shown as a tab of the lineside panel keeps
its open and expanded flags in a tool_tab. The trainsets waiting for the
save are handed to the editor by the tool, which hears back when they
were written. The self-test command trainset moves with it.
This commit is contained in:
maj00r
2026-10-21 09:44:17 +02:00
parent 8ba8345faf
commit c45c4713d6
11 changed files with 188 additions and 121 deletions

View File

@@ -67,6 +67,11 @@ glm::dvec3 editor_mode::camera_position() const
return Camera.Pos;
}
editor_mode::track_hover const &editor_mode::hovered_track() const
{
return m_hover;
}
void editor_mode::set_current_node(scene::basic_node *Node)
{
m_node = Node;
@@ -554,7 +559,7 @@ void editor_mode::render_track_inspector()
m_hekto.open = false;
m_fouling.open = false;
m_parallel.open = false;
m_vehicle.open = false;
m_vehicle.tab().open = false;
}
ui()->set_track(m_track_window_open);
if (false == m_track_window_open)