mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03: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.
(cherry picked from commit 8ab2cf3d2d)
This commit is contained in:
committed by
Yuri Sizov
parent
fcafb674af
commit
88475cfba9
@@ -39,7 +39,7 @@
|
||||
|
||||
void AcceptDialog::_input_from_window(const Ref<InputEvent> &p_event) {
|
||||
Ref<InputEventKey> key = p_event;
|
||||
if (close_on_escape && key.is_valid() && key->is_pressed() && key->get_keycode() == Key::ESCAPE) {
|
||||
if (close_on_escape && key.is_valid() && key->is_action_pressed(SNAME("ui_cancel"), false, true)) {
|
||||
_cancel_pressed();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user