diff options
Diffstat (limited to 'editor')
24 files changed, 38 insertions, 38 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index ab403c4212..179894915b 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -106,7 +106,7 @@ void EditorFileDialog::_notification(int p_what) { case NOTIFICATION_VISIBILITY_CHANGED: { if (!is_visible()) { - set_process_unhandled_input(false); + set_process_shortcut_input(false); } } break; @@ -126,7 +126,7 @@ void EditorFileDialog::_notification(int p_what) { } } -void EditorFileDialog::unhandled_input(const Ref<InputEvent> &p_event) { +void EditorFileDialog::shortcut_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); Ref<InputEventKey> k = p_event; @@ -327,7 +327,7 @@ void EditorFileDialog::_post_popup() { _update_favorites(); } - set_process_unhandled_input(true); + set_process_shortcut_input(true); } void EditorFileDialog::_thumbnail_result(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, const Variant &p_udata) { diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h index 07af8c5435..fffe7ffcc5 100644 --- a/editor/editor_file_dialog.h +++ b/editor/editor_file_dialog.h @@ -201,7 +201,7 @@ private: void _thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, const Variant &p_udata); void _request_single_thumbnail(const String &p_path); - virtual void unhandled_input(const Ref<InputEvent> &p_event) override; + virtual void shortcut_input(const Ref<InputEvent> &p_event) override; bool _is_open_should_be_disabled(); diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 1449edb58f..d5085942c3 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -685,7 +685,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) { } } -void EditorProperty::unhandled_key_input(const Ref<InputEvent> &p_event) { +void EditorProperty::shortcut_input(const Ref<InputEvent> &p_event) { if (!selected || !p_event->is_pressed()) { return; } @@ -971,7 +971,7 @@ EditorProperty::EditorProperty() { label_reference = nullptr; bottom_editor = nullptr; menu = nullptr; - set_process_unhandled_key_input(true); + set_process_shortcut_input(true); } void EditorProperty::_update_popup() { diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index c9e8a1672e..c5bcbe0725 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -128,7 +128,7 @@ protected: virtual void _set_read_only(bool p_read_only); virtual void gui_input(const Ref<InputEvent> &p_event) override; - virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override; + virtual void shortcut_input(const Ref<InputEvent> &p_event) override; const Color *_get_property_colors(); public: diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 52f7366dd7..0cd07333ea 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -430,7 +430,7 @@ void EditorNode::_update_title() { DisplayServer::get_singleton()->window_set_title(title); } -void EditorNode::unhandled_input(const Ref<InputEvent> &p_event) { +void EditorNode::shortcut_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); Ref<InputEventKey> k = p_event; @@ -7168,7 +7168,7 @@ EditorNode::EditorNode() { _update_recent_scenes(); editor_data.restore_editor_global_states(); - set_process_unhandled_input(true); + set_process_shortcut_input(true); load_errors = memnew(RichTextLabel); load_error_dialog = memnew(AcceptDialog); diff --git a/editor/editor_node.h b/editor/editor_node.h index 5f09d4e518..2e0fb19b87 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -585,7 +585,7 @@ private: void _exit_editor(int p_exit_code); - virtual void unhandled_input(const Ref<InputEvent> &p_event) override; + virtual void shortcut_input(const Ref<InputEvent> &p_event) override; bool has_main_screen() const { return true; } diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp index 285b909b66..dcbe91bd7f 100644 --- a/editor/editor_settings_dialog.cpp +++ b/editor/editor_settings_dialog.cpp @@ -92,7 +92,7 @@ void EditorSettingsDialog::popup_edit_settings() { search_box->grab_focus(); _update_shortcuts(); - set_process_unhandled_input(true); + set_process_shortcut_input(true); // Restore valid window bounds or pop up at default size. Rect2 saved_size = EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "editor_settings", Rect2()); @@ -119,7 +119,7 @@ void EditorSettingsDialog::_notification(int p_what) { case NOTIFICATION_VISIBILITY_CHANGED: { if (!is_visible()) { EditorSettings::get_singleton()->set_project_metadata("dialog_bounds", "editor_settings", Rect2(get_position(), get_size())); - set_process_unhandled_input(false); + set_process_shortcut_input(false); } } break; @@ -148,7 +148,7 @@ void EditorSettingsDialog::_notification(int p_what) { } } -void EditorSettingsDialog::unhandled_input(const Ref<InputEvent> &p_event) { +void EditorSettingsDialog::shortcut_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); const Ref<InputEventKey> k = p_event; diff --git a/editor/editor_settings_dialog.h b/editor/editor_settings_dialog.h index 42831c9ebd..9a34eac7ef 100644 --- a/editor/editor_settings_dialog.h +++ b/editor/editor_settings_dialog.h @@ -82,7 +82,7 @@ class EditorSettingsDialog : public AcceptDialog { void _settings_property_edited(const String &p_name); void _settings_save(); - virtual void unhandled_input(const Ref<InputEvent> &p_event) override; + virtual void shortcut_input(const Ref<InputEvent> &p_event) override; void _notification(int p_what); void _update_icons(); diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index ab8e2ca54a..af7c092d03 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -1267,7 +1267,7 @@ void AnimationPlayerEditor::_onion_skinning_menu(int p_option) { } } -void AnimationPlayerEditor::unhandled_key_input(const Ref<InputEvent> &p_ev) { +void AnimationPlayerEditor::shortcut_input(const Ref<InputEvent> &p_ev) { ERR_FAIL_COND(p_ev.is_null()); Ref<InputEventKey> k = p_ev; @@ -1750,7 +1750,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug last_active = false; timeline_position = 0; - set_process_unhandled_key_input(true); + set_process_shortcut_input(true); add_child(track_editor); track_editor->set_v_size_flags(SIZE_EXPAND_FILL); diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h index 850751e47a..4f6a9c534f 100644 --- a/editor/plugins/animation_player_editor_plugin.h +++ b/editor/plugins/animation_player_editor_plugin.h @@ -204,7 +204,7 @@ class AnimationPlayerEditor : public VBoxContainer { void _animation_key_editor_seek(float p_pos, bool p_drag, bool p_timeline_only = false); void _animation_key_editor_anim_len_changed(float p_len); - virtual void unhandled_key_input(const Ref<InputEvent> &p_ev) override; + virtual void shortcut_input(const Ref<InputEvent> &p_ev) override; void _animation_tool_menu(int p_option); void _onion_skinning_menu(int p_option); diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 20bd145299..405ece1471 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -640,7 +640,7 @@ void EditorAssetLibrary::_update_repository_options() { } } -void EditorAssetLibrary::unhandled_key_input(const Ref<InputEvent> &p_event) { +void EditorAssetLibrary::shortcut_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); const Ref<InputEventKey> key = p_event; @@ -1541,7 +1541,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { description = nullptr; set_process(true); - set_process_unhandled_key_input(true); // Global shortcuts since there is no main element to be focused. + set_process_shortcut_input(true); // Global shortcuts since there is no main element to be focused. downloads_scroll = memnew(ScrollContainer); downloads_scroll->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED); diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h index 2a04935c47..96830c31fd 100644 --- a/editor/plugins/asset_library_editor_plugin.h +++ b/editor/plugins/asset_library_editor_plugin.h @@ -304,7 +304,7 @@ class EditorAssetLibrary : public PanelContainer { protected: static void _bind_methods(); void _notification(int p_what); - virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override; + virtual void shortcut_input(const Ref<InputEvent> &p_event) override; public: void disable_community_support(); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 764f467192..78307fbe7c 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -475,7 +475,7 @@ real_t CanvasItemEditor::snap_angle(real_t p_target, real_t p_start) const { } } -void CanvasItemEditor::unhandled_key_input(const Ref<InputEvent> &p_ev) { +void CanvasItemEditor::shortcut_input(const Ref<InputEvent> &p_ev) { ERR_FAIL_COND(p_ev.is_null()); Ref<InputEventKey> k = p_ev; @@ -5322,7 +5322,7 @@ CanvasItemEditor::CanvasItemEditor() { ED_SHORTCUT("canvas_item_editor/zoom_800_percent", TTR("Zoom to 800%"), Key::KEY_4); ED_SHORTCUT("canvas_item_editor/zoom_1600_percent", TTR("Zoom to 1600%"), Key::KEY_5); - set_process_unhandled_key_input(true); + set_process_shortcut_input(true); // Update the menus' checkboxes call_deferred(SNAME("set_state"), get_state()); diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index 1b61cdc675..26852ea8ed 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -413,7 +413,7 @@ private: void _keying_changed(); - virtual void unhandled_key_input(const Ref<InputEvent> &p_ev) override; + virtual void shortcut_input(const Ref<InputEvent> &p_ev) override; void _draw_text_at_position(Point2 p_position, String p_string, Side p_side); void _draw_margin_at_position(int p_value, Point2 p_position, Side p_side); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index eab477adb7..090c140456 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -6848,7 +6848,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() { } } -void Node3DEditor::unhandled_key_input(const Ref<InputEvent> &p_event) { +void Node3DEditor::shortcut_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); if (!is_visible_in_tree()) { @@ -7893,7 +7893,7 @@ Node3DEditor::Node3DEditor() { selected = nullptr; - set_process_unhandled_key_input(true); + set_process_shortcut_input(true); add_to_group("_spatial_editor_group"); EDITOR_DEF("editors/3d/manipulator_gizmo_size", 80); diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index 5447befedd..d5d50c743c 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -770,7 +770,7 @@ private: protected: void _notification(int p_what); //void _gui_input(InputEvent p_event); - virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override; + virtual void shortcut_input(const Ref<InputEvent> &p_event) override; static void _bind_methods(); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index c56d4de6ad..0f45415c4d 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -3019,7 +3019,7 @@ void ScriptEditor::input(const Ref<InputEvent> &p_event) { } } -void ScriptEditor::unhandled_key_input(const Ref<InputEvent> &p_event) { +void ScriptEditor::shortcut_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); if (!is_visible_in_tree() || !p_event->is_pressed() || p_event->is_echo()) { @@ -3750,7 +3750,7 @@ ScriptEditor::ScriptEditor() { ED_SHORTCUT("script_editor/next_script", TTR("Next Script"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::PERIOD); ED_SHORTCUT("script_editor/prev_script", TTR("Previous Script"), KeyModifierMask::CMD | KeyModifierMask::SHIFT | Key::COMMA); set_process_input(true); - set_process_unhandled_key_input(true); + set_process_shortcut_input(true); file_menu = memnew(MenuButton); file_menu->set_text(TTR("File")); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 43f7f26a99..7885ffe2c5 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -426,7 +426,7 @@ class ScriptEditor : public PanelContainer { void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); virtual void input(const Ref<InputEvent> &p_event) override; - virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override; + virtual void shortcut_input(const Ref<InputEvent> &p_event) override; void _script_list_gui_input(const Ref<InputEvent> &ev); void _make_script_list_context_menu(); diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index cd95f97286..cbc4bb03f6 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1903,7 +1903,7 @@ void ProjectManager::_notification(int p_what) { } break; case NOTIFICATION_VISIBILITY_CHANGED: { - set_process_unhandled_key_input(is_visible_in_tree()); + set_process_shortcut_input(is_visible_in_tree()); } break; case NOTIFICATION_WM_CLOSE_REQUEST: { @@ -1962,7 +1962,7 @@ void ProjectManager::_update_project_buttons() { erase_missing_btn->set_disabled(!_project_list->is_any_project_missing()); } -void ProjectManager::unhandled_key_input(const Ref<InputEvent> &p_ev) { +void ProjectManager::shortcut_input(const Ref<InputEvent> &p_ev) { ERR_FAIL_COND(p_ev.is_null()); Ref<InputEventKey> k = p_ev; diff --git a/editor/project_manager.h b/editor/project_manager.h index 4f053793fd..9cea6e163f 100644 --- a/editor/project_manager.h +++ b/editor/project_manager.h @@ -126,7 +126,7 @@ class ProjectManager : public Control { void _install_project(const String &p_zip_path, const String &p_title); void _dim_window(); - virtual void unhandled_key_input(const Ref<InputEvent> &p_ev) override; + virtual void shortcut_input(const Ref<InputEvent> &p_ev) override; void _files_dropped(PackedStringArray p_files, int p_screen); void _version_button_pressed(); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 1318287dc8..8aaf3ddbef 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -49,7 +49,7 @@ void ProjectSettingsEditor::popup_project_settings() { _add_feature_overrides(); general_settings_inspector->update_category_list(); - set_process_unhandled_input(true); + set_process_shortcut_input(true); localization_editor->update_translations(); autoload_settings->update_autoload(); @@ -202,7 +202,7 @@ void ProjectSettingsEditor::_select_type(Variant::Type p_type) { type_box->select(type_box->get_item_index(p_type)); } -void ProjectSettingsEditor::unhandled_input(const Ref<InputEvent> &p_event) { +void ProjectSettingsEditor::shortcut_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); const Ref<InputEventKey> k = p_event; diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h index c9d849abec..24d61db443 100644 --- a/editor/project_settings_editor.h +++ b/editor/project_settings_editor.h @@ -82,7 +82,7 @@ class ProjectSettingsEditor : public AcceptDialog { void _feature_selected(int p_index); void _select_type(Variant::Type p_type); - virtual void unhandled_input(const Ref<InputEvent> &p_event) override; + virtual void shortcut_input(const Ref<InputEvent> &p_event) override; String _get_setting_name() const; void _setting_edited(const String &p_name); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 551a0ff9c8..32236b01ed 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -79,7 +79,7 @@ void SceneTreeDock::input(const Ref<InputEvent> &p_event) { } } -void SceneTreeDock::unhandled_key_input(const Ref<InputEvent> &p_event) { +void SceneTreeDock::shortcut_input(const Ref<InputEvent> &p_event) { ERR_FAIL_COND(p_event.is_null()); if (get_viewport()->gui_get_focus_owner() && get_viewport()->gui_get_focus_owner()->is_text_field()) { @@ -3476,7 +3476,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec add_child(quick_open); quick_open->connect("quick_open", callable_mp(this, &SceneTreeDock::_quick_open)); - set_process_unhandled_key_input(true); + set_process_shortcut_input(true); delete_dialog = memnew(ConfirmationDialog); add_child(delete_dialog); diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index 711ac5bc53..599fb01203 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -220,7 +220,7 @@ class SceneTreeDock : public VBoxContainer { void _nodes_drag_begin(); virtual void input(const Ref<InputEvent> &p_event) override; - virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override; + virtual void shortcut_input(const Ref<InputEvent> &p_event) override; void _import_subscene(); |