mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 02:49:19 +02:00
feat(ui): panels can be docked together and dragged out of the simulator window into windows of their own (imgui multi-viewports, ui.viewports yes by default, off where the renderer or the platform can't do it, e.g. wayland); imgui coordinates kept relative to the main window by the glfw backend, so the overlays, picking and gizmo of the editor work unchanged; overlays of the 3d view drawn on the main viewport; keys pressed in the separate windows passed on to the simulator, so the shortcuts of the editor work there too
This commit is contained in:
@@ -688,7 +688,7 @@ void editor_mode::draw_hekto_overlay() const
|
||||
if (false == tool.open || tool.track == nullptr)
|
||||
return;
|
||||
screen_projection const projection;
|
||||
auto *drawlist{ImGui::GetBackgroundDrawList()};
|
||||
auto *drawlist{ImGui::GetBackgroundDrawList(ImGui::GetMainViewport())};
|
||||
glm::dvec3 const camera{Global.pCamera.Pos};
|
||||
for (auto const &post : tool.posts)
|
||||
{
|
||||
@@ -955,7 +955,7 @@ void editor_mode::draw_fouling_overlay() const
|
||||
if (false == tool.open)
|
||||
return;
|
||||
screen_projection const projection;
|
||||
auto *drawlist{ImGui::GetBackgroundDrawList()};
|
||||
auto *drawlist{ImGui::GetBackgroundDrawList(ImGui::GetMainViewport())};
|
||||
glm::dvec3 const camera{Global.pCamera.Pos};
|
||||
for (auto const &point : tool.points)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user