summaryrefslogtreecommitdiffstats
path: root/editor/project_manager.cpp
diff options
context:
space:
mode:
authorEric M <itsjusteza@gmail.com>2020-09-17 11:40:00 +1000
committerEric M <itsjusteza@gmail.com>2020-11-23 21:14:26 +1000
commitefe5c250d5c0f749ed594ddd04fa76ca20abe4a4 (patch)
tree4f646765d7c89472d5d516bc84803e6c7af5e964 /editor/project_manager.cpp
parentfc806409f491f7585eecd0f01bd50609dfc93729 (diff)
downloadredot-engine-efe5c250d5c0f749ed594ddd04fa76ca20abe4a4.tar.gz
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'.
Diffstat (limited to 'editor/project_manager.cpp')
-rw-r--r--editor/project_manager.cpp6
1 files changed, 3 insertions, 3 deletions
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<InputEvent> &p_ev) {
+void ProjectManager::_unhandled_key_input(const Ref<InputEvent> &p_ev) {
Ref<InputEventKey> 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);
}