summaryrefslogtreecommitdiff
path: root/modules/visual_script
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 /modules/visual_script
parentfc806409f491f7585eecd0f01bd50609dfc93729 (diff)
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 'modules/visual_script')
-rw-r--r--modules/visual_script/visual_script_editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 1bb96a47f3..80e712e1ef 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -4728,6 +4728,7 @@ VisualScriptEditor::VisualScriptEditor() {
saved_position = Vector2(0, 0);
edit_menu = memnew(MenuButton);
+ edit_menu->set_shortcut_context(this);
edit_menu->set_text(TTR("Edit"));
edit_menu->set_switch_on_hover(true);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("visual_script_editor/delete_selected"), EDIT_DELETE_NODES);
@@ -4929,7 +4930,6 @@ VisualScriptEditor::VisualScriptEditor() {
updating_members = false;
set_process_input(true);
- set_process_unhandled_input(true);
default_value_edit = memnew(CustomPropertyEditor);
add_child(default_value_edit);