You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-05 17:15:09 +00:00
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 ba41910967)
This commit is contained in:
@@ -42,7 +42,7 @@ void EditorLayoutsDialog::_line_gui_input(const Ref<InputEvent> &p_event) {
|
|||||||
Ref<InputEventKey> k = p_event;
|
Ref<InputEventKey> k = p_event;
|
||||||
|
|
||||||
if (k.is_valid()) {
|
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()) {
|
if (get_hide_on_ok()) {
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1834,7 +1834,7 @@ void ThemeItemEditorDialog::_edit_theme_item_gui_input(const Ref<InputEvent> &p_
|
|||||||
return;
|
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();
|
_confirm_edit_theme_item();
|
||||||
edit_theme_item_dialog->hide();
|
edit_theme_item_dialog->hide();
|
||||||
edit_theme_item_dialog->set_input_as_handled();
|
edit_theme_item_dialog->set_input_as_handled();
|
||||||
|
|||||||
Reference in New Issue
Block a user