diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-27 13:53:29 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-27 13:53:29 +0200 |
commit | 7b393c6ceec12529352a30b9f7290ef2b45f78e4 (patch) | |
tree | c63ebc1b28e72e97bf22d524ee8671e923a3efad | |
parent | b537d2f15c94fd54e3621b23b38a1e58761b38ae (diff) | |
parent | c15fe90ac427175273079157ddacd1ec9123c026 (diff) | |
download | redot-engine-7b393c6ceec12529352a30b9f7290ef2b45f78e4.tar.gz |
Merge pull request #97453 from Calinou/project-manager-enter-accepts-dialog
Make pressing Enter confirm project creation/import in the project manager
-rw-r--r-- | editor/project_manager/project_dialog.cpp | 6 | ||||
-rw-r--r-- | scene/scene_string_names.cpp | 1 | ||||
-rw-r--r-- | scene/scene_string_names.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/editor/project_manager/project_dialog.cpp b/editor/project_manager/project_dialog.cpp index 7acda16890..01868846bf 100644 --- a/editor/project_manager/project_dialog.cpp +++ b/editor/project_manager/project_dialog.cpp @@ -1024,8 +1024,14 @@ ProjectDialog::ProjectDialog() { add_child(fdialog_install); project_name->connect(SceneStringName(text_changed), callable_mp(this, &ProjectDialog::_project_name_changed).unbind(1)); + project_name->connect(SceneStringName(text_submitted), callable_mp(this, &ProjectDialog::ok_pressed).unbind(1)); + project_path->connect(SceneStringName(text_changed), callable_mp(this, &ProjectDialog::_project_path_changed).unbind(1)); + project_path->connect(SceneStringName(text_submitted), callable_mp(this, &ProjectDialog::ok_pressed).unbind(1)); + install_path->connect(SceneStringName(text_changed), callable_mp(this, &ProjectDialog::_install_path_changed).unbind(1)); + install_path->connect(SceneStringName(text_submitted), callable_mp(this, &ProjectDialog::ok_pressed).unbind(1)); + fdialog_install->connect("dir_selected", callable_mp(this, &ProjectDialog::_install_path_selected)); fdialog_install->connect("file_selected", callable_mp(this, &ProjectDialog::_install_path_selected)); diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp index f8a0336b37..140e588291 100644 --- a/scene/scene_string_names.cpp +++ b/scene/scene_string_names.cpp @@ -141,5 +141,6 @@ SceneStringNames::SceneStringNames() { confirmed = StaticCString::create("confirmed"); text_changed = StaticCString::create("text_changed"); + text_submitted = StaticCString::create("text_submitted"); value_changed = StaticCString::create("value_changed"); } diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h index 381a161ad5..fc22be33b2 100644 --- a/scene/scene_string_names.h +++ b/scene/scene_string_names.h @@ -154,6 +154,7 @@ public: StringName confirmed; StringName text_changed; + StringName text_submitted; StringName value_changed; }; |