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

feat(editor): shift with 4 points, single path curves, undo

This commit is contained in:
maj00r
2026-10-03 00:39:16 +02:00
parent b5e1510c1e
commit 8a50d352fb
4 changed files with 245 additions and 69 deletions

View File

@@ -2758,6 +2758,7 @@ void editor_mode::on_key(int const Key, int const Scancode, int const Action, in
m_straights.handle = -1;
m_route.grip = -1;
m_straights.tool_placed = false;
m_straights.detour.clear();
}
break;
@@ -2867,7 +2868,10 @@ void editor_mode::on_mouse_button(int const Button, int const Action, int const
}
if ((Mods & (GLFW_MOD_CONTROL | GLFW_MOD_SHIFT)) != 0 && m_track_tab == track_tab::straights && false == current_straight().tracks.empty())
{
start_straight_gesture((Mods & GLFW_MOD_CONTROL) != 0 ? 1 : 2);
if ((Mods & GLFW_MOD_CONTROL) != 0)
start_straight_gesture(1);
else
add_detour_point();
m_input.mouse.button(Button, Action);
return;
}