mirror of
https://github.com/godotengine/godot.git
synced 2025-10-30 13:11:13 +00:00
Use defined key mapping for closing popups and dialogs
As opposed to hardcoding the escape key. Also removed such hardcoding in a few other places as well as a hardcoded enter key in one of the affected input fields.
This commit is contained in:
parent
809a982162
commit
8ab2cf3d2d
7 changed files with 26 additions and 66 deletions
|
|
@ -2415,7 +2415,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
|
|||
}
|
||||
}
|
||||
|
||||
if (k.is_valid() && k->is_pressed() && k->get_keycode() == Key::ESCAPE && drag_type == DRAG_NONE && tool == TOOL_SELECT) {
|
||||
if (k.is_valid() && k->is_action_pressed(SNAME("ui_cancel"), false, true) && drag_type == DRAG_NONE && tool == TOOL_SELECT) {
|
||||
// Unselect everything
|
||||
editor_selection->clear();
|
||||
viewport->queue_redraw();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue