From 1238554f05d4aa250b1ef1bdae0b85e2ab7e7047 Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Thu, 31 Aug 2023 14:35:31 +0800 Subject: [PATCH] Use ui_text_submit to confirm and close text prompts Fix press space when enter editor layout name will confirm and save layout, same in theme editor (cherry picked from commit ba4191096792d52c0b7fb5b33524678de0e4b260) --- editor/editor_layouts_dialog.cpp | 2 +- editor/plugins/theme_editor_plugin.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/editor_layouts_dialog.cpp b/editor/editor_layouts_dialog.cpp index 1f7172db575..dce61f66d39 100644 --- a/editor/editor_layouts_dialog.cpp +++ b/editor/editor_layouts_dialog.cpp @@ -42,7 +42,7 @@ void EditorLayoutsDialog::_line_gui_input(const Ref &p_event) { Ref k = p_event; if (k.is_valid()) { - if (k->is_action_pressed(SNAME("ui_accept"), false, true)) { + if (k->is_action_pressed(SNAME("ui_text_submit"), false, true)) { if (get_hide_on_ok()) { hide(); } diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 09053db122b..33555495436 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -1834,7 +1834,7 @@ void ThemeItemEditorDialog::_edit_theme_item_gui_input(const Ref &p_ return; } - if (k->is_action_pressed(SNAME("ui_accept"), false, true)) { + if (k->is_action_pressed(SNAME("ui_text_submit"), false, true)) { _confirm_edit_theme_item(); edit_theme_item_dialog->hide(); edit_theme_item_dialog->set_input_as_handled();