From efe5c250d5c0f749ed594ddd04fa76ca20abe4a4 Mon Sep 17 00:00:00 2001 From: Eric M Date: Thu, 17 Sep 2020 11:40:00 +1000 Subject: Implement new shortcuts system. unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'. --- editor/project_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'editor/project_manager.cpp') diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index f26d44d75a..c2431253a7 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1841,7 +1841,7 @@ void ProjectManager::_notification(int p_what) { } } break; case NOTIFICATION_VISIBILITY_CHANGED: { - set_process_unhandled_input(is_visible_in_tree()); + set_process_unhandled_key_input(is_visible_in_tree()); } break; case NOTIFICATION_WM_CLOSE_REQUEST: { _dim_window(); @@ -1880,7 +1880,7 @@ void ProjectManager::_update_project_buttons() { erase_missing_btn->set_disabled(!_project_list->is_any_project_missing()); } -void ProjectManager::_unhandled_input(const Ref &p_ev) { +void ProjectManager::_unhandled_key_input(const Ref &p_ev) { Ref k = p_ev; if (k.is_valid()) { @@ -2344,7 +2344,7 @@ void ProjectManager::_on_search_term_changed(const String &p_term) { void ProjectManager::_bind_methods() { ClassDB::bind_method("_exit_dialog", &ProjectManager::_exit_dialog); - ClassDB::bind_method("_unhandled_input", &ProjectManager::_unhandled_input); + ClassDB::bind_method("_unhandled_key_input", &ProjectManager::_unhandled_key_input); ClassDB::bind_method("_update_project_buttons", &ProjectManager::_update_project_buttons); } -- cgit v1.2.3