mirror of
https://github.com/godotengine/godot.git
synced 2025-10-23 18:03:35 +00:00
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'.
This commit is contained in:
parent
fc806409f4
commit
efe5c250d5
26 changed files with 154 additions and 54 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue