mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 12:09:19 +02:00
feat(editor): straights include switches, drag to edit
This commit is contained in:
@@ -2252,6 +2252,12 @@ void editor_mode::render_gizmo()
|
||||
return;
|
||||
}
|
||||
|
||||
if (straights_active())
|
||||
{
|
||||
render_straight_gizmo();
|
||||
return;
|
||||
}
|
||||
|
||||
if (route_active())
|
||||
{
|
||||
render_route_gizmo();
|
||||
@@ -2738,6 +2744,7 @@ void editor_mode::on_key(int const Key, int const Scancode, int const Action, in
|
||||
{
|
||||
m_track_point = {};
|
||||
m_route.vertex = -1;
|
||||
m_straights.handle = -1;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2831,7 +2838,7 @@ void editor_mode::on_mouse_button(int const Button, int const Action, int const
|
||||
|
||||
if (mode == nodebank_panel::TRACK)
|
||||
{
|
||||
if (false == ImGuizmo::IsOver() && false == pick_route_vertex() && false == pick_track_handle())
|
||||
if (false == ImGuizmo::IsOver() && false == pick_route_vertex() && false == pick_straight_handle() && false == pick_track_handle())
|
||||
{
|
||||
GfxRenderer->Pick_Node_Callback([this](scene::basic_node *node) {
|
||||
if (viewport_click())
|
||||
|
||||
Reference in New Issue
Block a user