diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-20 13:09:05 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-20 13:09:05 +0200 |
commit | bfcfa1028815a2d45c9a4a5711488c8b74f03e80 (patch) | |
tree | fd8a516ed575f7aa59ea358e299c390cb4f1484a /editor/plugins/curve_editor_plugin.cpp | |
parent | 571cd0eb791b37e9a8adda9f909251138170f6b7 (diff) | |
parent | 6afadbaa9f91ef69aea2c91f154f1e299e9cc863 (diff) | |
download | redot-engine-bfcfa1028815a2d45c9a4a5711488c8b74f03e80.tar.gz |
Merge pull request #71905 from ajreckof/change_CTRL_for_command_or_control
Replace Ctrl in editor shortcuts with Cmd or Ctrl depending on platform
Diffstat (limited to 'editor/plugins/curve_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/curve_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 1d3ffc0e3a..37f0ca449d 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -225,7 +225,7 @@ void CurveEdit::gui_input(const Ref<InputEvent> &p_event) { } else if (grabbing == GRAB_NONE) { // Adding a new point. Insert a temporary point for the user to adjust, so it's not in the undo/redo. Vector2 new_pos = get_world_pos(mpos).clamp(Vector2(0.0, curve->get_min_value()), Vector2(1.0, curve->get_max_value())); - if (snap_enabled || mb->is_ctrl_pressed()) { + if (snap_enabled || mb->is_command_or_control_pressed()) { new_pos.x = Math::snapped(new_pos.x, 1.0 / snap_count); new_pos.y = Math::snapped(new_pos.y - curve->get_min_value(), curve->get_range() / snap_count) + curve->get_min_value(); } @@ -276,7 +276,7 @@ void CurveEdit::gui_input(const Ref<InputEvent> &p_event) { // Drag point. Vector2 new_pos = get_world_pos(mpos).clamp(Vector2(0.0, curve->get_min_value()), Vector2(1.0, curve->get_max_value())); - if (snap_enabled || mm->is_ctrl_pressed()) { + if (snap_enabled || mm->is_command_or_control_pressed()) { new_pos.x = Math::snapped(new_pos.x, 1.0 / snap_count); new_pos.y = Math::snapped(new_pos.y - curve->get_min_value(), curve->get_range() / snap_count) + curve->get_min_value(); } |