From c15fe90ac427175273079157ddacd1ec9123c026 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 25 Sep 2024 16:01:36 +0200 Subject: Make pressing Enter confirm project creation/import in the project manager This makes the project manager more friendly to keyboard usage. You can now create projects more easily without touching the mouse by opening the project manager, pressing Ctrl + N, entering a project name and pressing Enter. --- editor/project_manager/project_dialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'editor/project_manager') 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)); -- cgit v1.2.3