diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index c0ee0f9f5d3..aff56bf792a 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -834,20 +834,20 @@ void AnimationBezierTrackEdit::gui_input(const Ref &p_event) { } if (p_event->is_pressed()) { - if (ED_GET_SHORTCUT("animation_editor/duplicate_selected_keys")->matches_event(p_event)) { + if (ED_IS_SHORTCUT("animation_editor/duplicate_selected_keys", p_event)) { if (!read_only) { duplicate_selected_keys(-1.0); } accept_event(); } - if (ED_GET_SHORTCUT("animation_editor/copy_selected_keys")->matches_event(p_event)) { + if (ED_IS_SHORTCUT("animation_editor/copy_selected_keys", p_event)) { if (!read_only) { copy_selected_keys(false); } accept_event(); } - if (ED_GET_SHORTCUT("animation_editor/paste_keys")->matches_event(p_event)) { + if (ED_IS_SHORTCUT("animation_editor/paste_keys", p_event)) { if (!read_only) { paste_keys(-1.0); } @@ -858,7 +858,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref &p_event) { Ref key_press = p_event; if (key_press.is_valid() && key_press->is_pressed()) { - if (ED_GET_SHORTCUT("animation_bezier_editor/focus")->matches_event(p_event)) { + if (ED_IS_SHORTCUT("animation_bezier_editor/focus", p_event)) { SelectionSet focused_keys; if (selection.is_empty()) { for (int i = 0; i < edit_points.size(); ++i) { @@ -927,7 +927,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref &p_event) { queue_redraw(); accept_event(); return; - } else if (ED_GET_SHORTCUT("animation_bezier_editor/select_all_keys")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("animation_bezier_editor/select_all_keys", p_event)) { for (int i = 0; i < edit_points.size(); ++i) { selection.insert(IntPair(edit_points[i].track, edit_points[i].key)); } @@ -935,7 +935,7 @@ void AnimationBezierTrackEdit::gui_input(const Ref &p_event) { queue_redraw(); accept_event(); return; - } else if (ED_GET_SHORTCUT("animation_bezier_editor/deselect_all_keys")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("animation_bezier_editor/deselect_all_keys", p_event)) { selection.clear(); queue_redraw(); diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 23f2b781997..f893234acfc 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -2685,33 +2685,33 @@ void AnimationTrackEdit::gui_input(const Ref &p_event) { ERR_FAIL_COND(p_event.is_null()); if (p_event->is_pressed()) { - if (ED_GET_SHORTCUT("animation_editor/duplicate_selected_keys")->matches_event(p_event)) { + if (ED_IS_SHORTCUT("animation_editor/duplicate_selected_keys", p_event)) { if (!read_only) { emit_signal(SNAME("duplicate_request"), -1.0); } accept_event(); } - if (ED_GET_SHORTCUT("animation_editor/cut_selected_keys")->matches_event(p_event)) { + if (ED_IS_SHORTCUT("animation_editor/cut_selected_keys", p_event)) { if (!read_only) { emit_signal(SNAME("cut_request")); } accept_event(); } - if (ED_GET_SHORTCUT("animation_editor/copy_selected_keys")->matches_event(p_event)) { + if (ED_IS_SHORTCUT("animation_editor/copy_selected_keys", p_event)) { if (!read_only) { emit_signal(SNAME("copy_request")); } accept_event(); } - if (ED_GET_SHORTCUT("animation_editor/paste_keys")->matches_event(p_event)) { + if (ED_IS_SHORTCUT("animation_editor/paste_keys", p_event)) { if (!read_only) { emit_signal(SNAME("paste_request"), -1.0); } accept_event(); } - if (ED_GET_SHORTCUT("animation_editor/delete_selection")->matches_event(p_event)) { + if (ED_IS_SHORTCUT("animation_editor/delete_selection", p_event)) { if (!read_only) { emit_signal(SNAME("delete_request")); } diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 132b85b090e..bb076163b0b 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1285,25 +1285,25 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref &p_event, bo Ref k = p_event; if (k.is_valid()) { if (k->is_pressed()) { - if (ED_GET_SHORTCUT("canvas_item_editor/zoom_3.125_percent")->matches_event(p_event)) { + if (ED_IS_SHORTCUT("canvas_item_editor/zoom_3.125_percent", p_event)) { _shortcut_zoom_set(1.0 / 32.0); - } else if (ED_GET_SHORTCUT("canvas_item_editor/zoom_6.25_percent")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("canvas_item_editor/zoom_6.25_percent", p_event)) { _shortcut_zoom_set(1.0 / 16.0); - } else if (ED_GET_SHORTCUT("canvas_item_editor/zoom_12.5_percent")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("canvas_item_editor/zoom_12.5_percent", p_event)) { _shortcut_zoom_set(1.0 / 8.0); - } else if (ED_GET_SHORTCUT("canvas_item_editor/zoom_25_percent")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("canvas_item_editor/zoom_25_percent", p_event)) { _shortcut_zoom_set(1.0 / 4.0); - } else if (ED_GET_SHORTCUT("canvas_item_editor/zoom_50_percent")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("canvas_item_editor/zoom_50_percent", p_event)) { _shortcut_zoom_set(1.0 / 2.0); - } else if (ED_GET_SHORTCUT("canvas_item_editor/zoom_100_percent")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("canvas_item_editor/zoom_100_percent", p_event)) { _shortcut_zoom_set(1.0); - } else if (ED_GET_SHORTCUT("canvas_item_editor/zoom_200_percent")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("canvas_item_editor/zoom_200_percent", p_event)) { _shortcut_zoom_set(2.0); - } else if (ED_GET_SHORTCUT("canvas_item_editor/zoom_400_percent")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("canvas_item_editor/zoom_400_percent", p_event)) { _shortcut_zoom_set(4.0); - } else if (ED_GET_SHORTCUT("canvas_item_editor/zoom_800_percent")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("canvas_item_editor/zoom_800_percent", p_event)) { _shortcut_zoom_set(8.0); - } else if (ED_GET_SHORTCUT("canvas_item_editor/zoom_1600_percent")->matches_event(p_event)) { + } else if (ED_IS_SHORTCUT("canvas_item_editor/zoom_1600_percent", p_event)) { _shortcut_zoom_set(16.0); } }