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

feat(editor): docked layout: windows of the editor docked around the 3d view (dockspace over the main window, default layout built when there's none or on Mode windows > Reset window layout), menu shown all the time, toolbar with the edit modes, track and road windows, gizmo operations and the top view, status bar with the outcome of the last operation and the selected node; dockspace submitted also when the frame was started by the ui of another mode, so docked windows don't come undocked on the change of mode; stable ids of the editor windows, no auto resize of the dockable ones; hints of the track and road tools placed in the part of the window the 3d view is seen in; Polish translation

This commit is contained in:
2026-10-08 21:39:31 +02:00
parent 476f3bf1b7
commit 60c7250683
11 changed files with 205 additions and 15 deletions

View File

@@ -2834,8 +2834,7 @@ void editor_mode::draw_road_overlay() const
"LMB: select a piece, a junction, a point (white dot) or a marker";
}
// shown above the place the track tools put their hints at
ImGuiIO const &io = ImGui::GetIO();
ImVec2 const position{12.0f, io.DisplaySize.y - 56.0f};
ImVec2 const position{editor_ui::view_min().x + 12.0f, editor_ui::view_max().y - 56.0f};
auto const size{ImGui::CalcTextSize(hint.c_str())};
drawlist->AddRectFilled(ImVec2(position.x - 6.0f, position.y - 4.0f), ImVec2(position.x + size.x + 6.0f, position.y + size.y + 4.0f), IM_COL32(0, 0, 0, 150), 4.0f);
drawlist->AddText(position, IM_COL32(255, 255, 255, 230), hint.c_str());