summaryrefslogtreecommitdiffstats
path: root/editor/project_manager
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-05-14 09:40:21 +0200
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-05-14 15:51:28 +0200
commitee79386f7b5620c3d1ed18d24de7b9a4731602d4 (patch)
tree9740ef15899f7714cc81fc8cb018553ef5593d94 /editor/project_manager
parent78cce1954ddb6fefb90b33742215f304ec7b0b94 (diff)
downloadredot-engine-ee79386f7b5620c3d1ed18d24de7b9a4731602d4.tar.gz
[Scene] Add SceneStringNames::pressed
Diffstat (limited to 'editor/project_manager')
-rw-r--r--editor/project_manager/project_dialog.cpp12
-rw-r--r--editor/project_manager/project_list.cpp4
-rw-r--r--editor/project_manager/project_tag.cpp2
-rw-r--r--editor/project_manager/quick_settings_dialog.cpp2
4 files changed, 10 insertions, 10 deletions
diff --git a/editor/project_manager/project_dialog.cpp b/editor/project_manager/project_dialog.cpp
index 81fdf9c369..99aa83a09c 100644
--- a/editor/project_manager/project_dialog.cpp
+++ b/editor/project_manager/project_dialog.cpp
@@ -462,7 +462,7 @@ void ProjectDialog::ok_pressed() {
ConfirmationDialog *cd = memnew(ConfirmationDialog);
cd->set_title(TTR("Warning: This folder is not empty"));
cd->set_text(TTR("You are about to create a Godot project in a non-empty folder.\nThe entire contents of this folder will be imported as project resources!\n\nAre you sure you wish to continue?"));
- cd->get_ok_button()->connect("pressed", callable_mp(this, &ProjectDialog::_nonempty_confirmation_ok_pressed));
+ cd->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &ProjectDialog::_nonempty_confirmation_ok_pressed));
get_parent()->add_child(cd);
cd->popup_centered();
return;
@@ -855,7 +855,7 @@ ProjectDialog::ProjectDialog() {
project_browse = memnew(Button);
project_browse->set_text(TTR("Browse"));
- project_browse->connect("pressed", callable_mp(this, &ProjectDialog::_browse_project_path));
+ project_browse->connect(SceneStringName(pressed), callable_mp(this, &ProjectDialog::_browse_project_path));
pphb->add_child(project_browse);
// install status icon
@@ -865,7 +865,7 @@ ProjectDialog::ProjectDialog() {
install_browse = memnew(Button);
install_browse->set_text(TTR("Browse"));
- install_browse->connect("pressed", callable_mp(this, &ProjectDialog::_browse_install_path));
+ install_browse->connect(SceneStringName(pressed), callable_mp(this, &ProjectDialog::_browse_install_path));
iphb->add_child(install_browse);
msg = memnew(Label);
@@ -900,7 +900,7 @@ ProjectDialog::ProjectDialog() {
rs_button->set_disabled(true);
#endif
rs_button->set_meta(SNAME("rendering_method"), "forward_plus");
- rs_button->connect("pressed", callable_mp(this, &ProjectDialog::_renderer_selected));
+ rs_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectDialog::_renderer_selected));
rvb->add_child(rs_button);
if (default_renderer_type == "forward_plus") {
rs_button->set_pressed(true);
@@ -912,7 +912,7 @@ ProjectDialog::ProjectDialog() {
rs_button->set_disabled(true);
#endif
rs_button->set_meta(SNAME("rendering_method"), "mobile");
- rs_button->connect("pressed", callable_mp(this, &ProjectDialog::_renderer_selected));
+ rs_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectDialog::_renderer_selected));
rvb->add_child(rs_button);
if (default_renderer_type == "mobile") {
rs_button->set_pressed(true);
@@ -924,7 +924,7 @@ ProjectDialog::ProjectDialog() {
rs_button->set_disabled(true);
#endif
rs_button->set_meta(SNAME("rendering_method"), "gl_compatibility");
- rs_button->connect("pressed", callable_mp(this, &ProjectDialog::_renderer_selected));
+ rs_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectDialog::_renderer_selected));
rvb->add_child(rs_button);
#if defined(GLES3_ENABLED)
if (default_renderer_type == "gl_compatibility") {
diff --git a/editor/project_manager/project_list.cpp b/editor/project_manager/project_list.cpp
index 00f94a7e76..32f088ec60 100644
--- a/editor/project_manager/project_list.cpp
+++ b/editor/project_manager/project_list.cpp
@@ -216,7 +216,7 @@ ProjectListItemControl::ProjectListItemControl() {
// This makes the project's "hover" style display correctly when hovering the favorite icon.
favorite_button->set_mouse_filter(MOUSE_FILTER_PASS);
favorite_box->add_child(favorite_button);
- favorite_button->connect("pressed", callable_mp(this, &ProjectListItemControl::_favorite_button_pressed));
+ favorite_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectListItemControl::_favorite_button_pressed));
project_icon = memnew(TextureRect);
project_icon->set_name("ProjectIcon");
@@ -262,7 +262,7 @@ ProjectListItemControl::ProjectListItemControl() {
explore_button->set_name("ExploreButton");
explore_button->set_flat(true);
path_hb->add_child(explore_button);
- explore_button->connect("pressed", callable_mp(this, &ProjectListItemControl::_explore_button_pressed));
+ explore_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectListItemControl::_explore_button_pressed));
project_path = memnew(Label);
project_path->set_name("ProjectPath");
diff --git a/editor/project_manager/project_tag.cpp b/editor/project_manager/project_tag.cpp
index 8fb05b549e..618b6555d4 100644
--- a/editor/project_manager/project_tag.cpp
+++ b/editor/project_manager/project_tag.cpp
@@ -41,7 +41,7 @@ void ProjectTag::_notification(int p_what) {
}
void ProjectTag::connect_button_to(const Callable &p_callable) {
- button->connect(SNAME("pressed"), p_callable, CONNECT_DEFERRED);
+ button->connect(SceneStringName(pressed), p_callable, CONNECT_DEFERRED);
}
const String ProjectTag::get_tag() const {
diff --git a/editor/project_manager/quick_settings_dialog.cpp b/editor/project_manager/quick_settings_dialog.cpp
index 255b15f7f6..63fe423b1f 100644
--- a/editor/project_manager/quick_settings_dialog.cpp
+++ b/editor/project_manager/quick_settings_dialog.cpp
@@ -165,7 +165,7 @@ void QuickSettingsDialog::_set_setting_value(const String &p_setting, const Vari
if (!restart_required_button) {
restart_required_button = add_button(TTR("Restart Now"), !GLOBAL_GET("gui/common/swap_cancel_ok"));
- restart_required_button->connect("pressed", callable_mp(this, &QuickSettingsDialog::_request_restart));
+ restart_required_button->connect(SceneStringName(pressed), callable_mp(this, &QuickSettingsDialog::_request_restart));
}
}
}