[Scene] Add SceneStringNames::confirmed

This commit is contained in:
A Thousand Ships 2024-05-14 14:28:18 +02:00
parent d9e2fc74c7
commit ca18a06ecb
No known key found for this signature in database
GPG Key ID: 2033189A662F8BD7
66 changed files with 128 additions and 124 deletions

View File

@ -614,7 +614,7 @@ ActionMapEditor::ActionMapEditor() {
// Adding event dialog // Adding event dialog
event_config_dialog = memnew(InputEventConfigurationDialog); event_config_dialog = memnew(InputEventConfigurationDialog);
event_config_dialog->connect("confirmed", callable_mp(this, &ActionMapEditor::_event_config_confirmed)); event_config_dialog->connect(SceneStringName(confirmed), callable_mp(this, &ActionMapEditor::_event_config_confirmed));
add_child(event_config_dialog); add_child(event_config_dialog);
message = memnew(AcceptDialog); message = memnew(AcceptDialog);

View File

@ -7406,7 +7406,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
insert_confirm = memnew(ConfirmationDialog); insert_confirm = memnew(ConfirmationDialog);
add_child(insert_confirm); add_child(insert_confirm);
insert_confirm->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_confirm_insert_list)); insert_confirm->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_confirm_insert_list));
VBoxContainer *icvb = memnew(VBoxContainer); VBoxContainer *icvb = memnew(VBoxContainer);
insert_confirm->add_child(icvb); insert_confirm->add_child(icvb);
insert_confirm_text = memnew(Label); insert_confirm_text = memnew(Label);
@ -7463,7 +7463,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
optimize_vb->add_margin_child(TTR("Max Precision Error:"), optimize_precision_error); optimize_vb->add_margin_child(TTR("Max Precision Error:"), optimize_precision_error);
optimize_dialog->set_ok_button_text(TTR("Optimize")); optimize_dialog->set_ok_button_text(TTR("Optimize"));
optimize_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_OPTIMIZE_ANIMATION_CONFIRM)); optimize_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_OPTIMIZE_ANIMATION_CONFIRM));
// //
cleanup_dialog = memnew(ConfirmationDialog); cleanup_dialog = memnew(ConfirmationDialog);
@ -7498,7 +7498,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
cleanup_dialog->set_title(TTR("Clean-Up Animation(s) (NO UNDO!)")); cleanup_dialog->set_title(TTR("Clean-Up Animation(s) (NO UNDO!)"));
cleanup_dialog->set_ok_button_text(TTR("Clean-Up")); cleanup_dialog->set_ok_button_text(TTR("Clean-Up"));
cleanup_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_CLEAN_UP_ANIMATION_CONFIRM)); cleanup_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_CLEAN_UP_ANIMATION_CONFIRM));
// //
scale_dialog = memnew(ConfirmationDialog); scale_dialog = memnew(ConfirmationDialog);
@ -7510,13 +7510,13 @@ AnimationTrackEditor::AnimationTrackEditor() {
scale->set_max(99999); scale->set_max(99999);
scale->set_step(0.001); scale->set_step(0.001);
vbc->add_margin_child(TTR("Scale Ratio:"), scale); vbc->add_margin_child(TTR("Scale Ratio:"), scale);
scale_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_SCALE_CONFIRM)); scale_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_SCALE_CONFIRM));
add_child(scale_dialog); add_child(scale_dialog);
// //
ease_dialog = memnew(ConfirmationDialog); ease_dialog = memnew(ConfirmationDialog);
ease_dialog->set_title(TTR("Select Transition and Easing")); ease_dialog->set_title(TTR("Select Transition and Easing"));
ease_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_EASE_CONFIRM)); ease_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_EASE_CONFIRM));
add_child(ease_dialog); add_child(ease_dialog);
GridContainer *ease_grid = memnew(GridContainer); GridContainer *ease_grid = memnew(GridContainer);
ease_grid->set_columns(2); ease_grid->set_columns(2);
@ -7558,7 +7558,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
// //
bake_dialog = memnew(ConfirmationDialog); bake_dialog = memnew(ConfirmationDialog);
bake_dialog->set_title(TTR("Animation Baker")); bake_dialog->set_title(TTR("Animation Baker"));
bake_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_BAKE_ANIMATION_CONFIRM)); bake_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_BAKE_ANIMATION_CONFIRM));
add_child(bake_dialog); add_child(bake_dialog);
GridContainer *bake_grid = memnew(GridContainer); GridContainer *bake_grid = memnew(GridContainer);
bake_grid->set_columns(2); bake_grid->set_columns(2);
@ -7603,7 +7603,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
track_copy_select->set_v_size_flags(SIZE_EXPAND_FILL); track_copy_select->set_v_size_flags(SIZE_EXPAND_FILL);
track_copy_select->set_hide_root(true); track_copy_select->set_hide_root(true);
track_copy_vbox->add_child(track_copy_select); track_copy_vbox->add_child(track_copy_select);
track_copy_dialog->connect("confirmed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_COPY_TRACKS_CONFIRM)); track_copy_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed).bind(EDIT_COPY_TRACKS_CONFIRM));
} }
AnimationTrackEditor::~AnimationTrackEditor() { AnimationTrackEditor::~AnimationTrackEditor() {

View File

@ -1613,7 +1613,7 @@ ConnectionsDock::ConnectionsDock() {
disconnect_all_dialog = memnew(ConfirmationDialog); disconnect_all_dialog = memnew(ConfirmationDialog);
add_child(disconnect_all_dialog); add_child(disconnect_all_dialog);
disconnect_all_dialog->connect("confirmed", callable_mp(this, &ConnectionsDock::_disconnect_all)); disconnect_all_dialog->connect(SceneStringName(confirmed), callable_mp(this, &ConnectionsDock::_disconnect_all));
disconnect_all_dialog->set_text(TTR("Are you sure you want to remove all connections from this signal?")); disconnect_all_dialog->set_text(TTR("Are you sure you want to remove all connections from this signal?"));
class_menu = memnew(PopupMenu); class_menu = memnew(PopupMenu);

View File

@ -447,11 +447,11 @@ void CreateDialog::_sbox_input(const Ref<InputEvent> &p_ie) {
void CreateDialog::_notification(int p_what) { void CreateDialog::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_ENTER_TREE: { case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &CreateDialog::_confirmed)); connect(SceneStringName(confirmed), callable_mp(this, &CreateDialog::_confirmed));
} break; } break;
case NOTIFICATION_EXIT_TREE: { case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &CreateDialog::_confirmed)); disconnect(SceneStringName(confirmed), callable_mp(this, &CreateDialog::_confirmed));
} break; } break;
case NOTIFICATION_VISIBILITY_CHANGED: { case NOTIFICATION_VISIBILITY_CHANGED: {

View File

@ -327,7 +327,7 @@ void DependencyEditorOwners::_select_file(int p_idx) {
EditorNode::get_singleton()->load_resource(fpath); EditorNode::get_singleton()->load_resource(fpath);
} }
hide(); hide();
emit_signal(SNAME("confirmed")); emit_signal(SceneStringName(confirmed));
} }
void DependencyEditorOwners::_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index) { void DependencyEditorOwners::_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index) {
@ -875,7 +875,7 @@ OrphanResourcesDialog::OrphanResourcesDialog() {
add_child(delete_confirm); add_child(delete_confirm);
dep_edit = memnew(DependencyEditor); dep_edit = memnew(DependencyEditor);
add_child(dep_edit); add_child(dep_edit);
delete_confirm->connect("confirmed", callable_mp(this, &OrphanResourcesDialog::_delete_confirm)); delete_confirm->connect(SceneStringName(confirmed), callable_mp(this, &OrphanResourcesDialog::_delete_confirm));
set_hide_on_ok(false); set_hide_on_ok(false);
VBoxContainer *vbc = memnew(VBoxContainer); VBoxContainer *vbc = memnew(VBoxContainer);

View File

@ -864,7 +864,7 @@ EditorBuildProfileManager::EditorBuildProfileManager() {
confirm_dialog = memnew(ConfirmationDialog); confirm_dialog = memnew(ConfirmationDialog);
add_child(confirm_dialog); add_child(confirm_dialog);
confirm_dialog->set_title(TTR("Please Confirm:")); confirm_dialog->set_title(TTR("Please Confirm:"));
confirm_dialog->connect("confirmed", callable_mp(this, &EditorBuildProfileManager::_action_confirm)); confirm_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorBuildProfileManager::_action_confirm));
import_profile = memnew(EditorFileDialog); import_profile = memnew(EditorFileDialog);
add_child(import_profile); add_child(import_profile);

View File

@ -342,7 +342,7 @@ EditorCommandPalette *EditorCommandPalette::get_singleton() {
EditorCommandPalette::EditorCommandPalette() { EditorCommandPalette::EditorCommandPalette() {
set_hide_on_ok(false); set_hide_on_ok(false);
connect("confirmed", callable_mp(this, &EditorCommandPalette::_confirmed)); connect(SceneStringName(confirmed), callable_mp(this, &EditorCommandPalette::_confirmed));
VBoxContainer *vbc = memnew(VBoxContainer); VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc); add_child(vbc);

View File

@ -1026,14 +1026,14 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {
new_profile_vb->add_child(new_profile_name); new_profile_vb->add_child(new_profile_name);
new_profile_name->set_custom_minimum_size(Size2(300 * EDSCALE, 1)); new_profile_name->set_custom_minimum_size(Size2(300 * EDSCALE, 1));
add_child(new_profile_dialog); add_child(new_profile_dialog);
new_profile_dialog->connect("confirmed", callable_mp(this, &EditorFeatureProfileManager::_create_new_profile)); new_profile_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorFeatureProfileManager::_create_new_profile));
new_profile_dialog->register_text_enter(new_profile_name); new_profile_dialog->register_text_enter(new_profile_name);
new_profile_dialog->set_ok_button_text(TTR("Create")); new_profile_dialog->set_ok_button_text(TTR("Create"));
erase_profile_dialog = memnew(ConfirmationDialog); erase_profile_dialog = memnew(ConfirmationDialog);
add_child(erase_profile_dialog); add_child(erase_profile_dialog);
erase_profile_dialog->set_title(TTR("Remove Profile")); erase_profile_dialog->set_title(TTR("Remove Profile"));
erase_profile_dialog->connect("confirmed", callable_mp(this, &EditorFeatureProfileManager::_erase_selected_profile)); erase_profile_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorFeatureProfileManager::_erase_selected_profile));
import_profiles = memnew(EditorFileDialog); import_profiles = memnew(EditorFileDialog);
add_child(import_profiles); add_child(import_profiles);

View File

@ -212,7 +212,7 @@ void EditorHelpSearch::_notification(int p_what) {
} break; } break;
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
connect("confirmed", callable_mp(this, &EditorHelpSearch::_confirmed)); connect(SceneStringName(confirmed), callable_mp(this, &EditorHelpSearch::_confirmed));
} break; } break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {

View File

@ -2471,7 +2471,7 @@ EditorInspectorArray::EditorInspectorArray(bool p_read_only) {
resize_dialog = memnew(AcceptDialog); resize_dialog = memnew(AcceptDialog);
resize_dialog->set_title(TTRC("Resize Array")); resize_dialog->set_title(TTRC("Resize Array"));
resize_dialog->add_cancel_button(); resize_dialog->add_cancel_button();
resize_dialog->connect("confirmed", callable_mp(this, &EditorInspectorArray::_resize_dialog_confirmed)); resize_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorInspectorArray::_resize_dialog_confirmed));
add_child(resize_dialog); add_child(resize_dialog);
VBoxContainer *resize_dialog_vbox = memnew(VBoxContainer); VBoxContainer *resize_dialog_vbox = memnew(VBoxContainer);
@ -4292,7 +4292,7 @@ void EditorInspector::_show_add_meta_dialog() {
add_meta_dialog->set_ok_button_text(TTR("Add")); add_meta_dialog->set_ok_button_text(TTR("Add"));
add_child(add_meta_dialog); add_child(add_meta_dialog);
add_meta_dialog->register_text_enter(add_meta_name); add_meta_dialog->register_text_enter(add_meta_name);
add_meta_dialog->connect("confirmed", callable_mp(this, &EditorInspector::_add_meta_confirm)); add_meta_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorInspector::_add_meta_confirm));
validation_panel = memnew(EditorValidationPanel); validation_panel = memnew(EditorValidationPanel);
vbc->add_child(validation_panel); vbc->add_child(validation_panel);

View File

@ -5292,7 +5292,7 @@ bool EditorNode::immediate_confirmation_dialog(const String &p_text, const Strin
cd->get_label()->set_custom_minimum_size(Size2(p_wrap_width, 0) * EDSCALE); cd->get_label()->set_custom_minimum_size(Size2(p_wrap_width, 0) * EDSCALE);
} }
cd->connect("confirmed", callable_mp(singleton, &EditorNode::_immediate_dialog_confirmed)); cd->connect(SceneStringName(confirmed), callable_mp(singleton, &EditorNode::_immediate_dialog_confirmed));
singleton->gui_base->add_child(cd); singleton->gui_base->add_child(cd);
cd->popup_centered(); cd->popup_centered();
@ -6846,7 +6846,7 @@ EditorNode::EditorNode() {
save_accept = memnew(AcceptDialog); save_accept = memnew(AcceptDialog);
save_accept->set_unparent_when_invisible(true); save_accept->set_unparent_when_invisible(true);
save_accept->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind((int)MenuOptions::FILE_SAVE_AS_SCENE)); save_accept->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_menu_option).bind((int)MenuOptions::FILE_SAVE_AS_SCENE));
project_export = memnew(ProjectExportDialog); project_export = memnew(ProjectExportDialog);
gui_base->add_child(project_export); gui_base->add_child(project_export);
@ -7164,7 +7164,7 @@ EditorNode::EditorNode() {
video_restart_dialog = memnew(ConfirmationDialog); video_restart_dialog = memnew(ConfirmationDialog);
video_restart_dialog->set_ok_button_text(TTR("Save & Restart")); video_restart_dialog->set_ok_button_text(TTR("Save & Restart"));
video_restart_dialog->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SET_RENDERER_NAME_SAVE_AND_RESTART)); video_restart_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_menu_option).bind(SET_RENDERER_NAME_SAVE_AND_RESTART));
gui_base->add_child(video_restart_dialog); gui_base->add_child(video_restart_dialog);
progress_hb = memnew(BackgroundProgress); progress_hb = memnew(BackgroundProgress);
@ -7266,13 +7266,13 @@ EditorNode::EditorNode() {
confirmation = memnew(ConfirmationDialog); confirmation = memnew(ConfirmationDialog);
gui_base->add_child(confirmation); gui_base->add_child(confirmation);
confirmation->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current)); confirmation->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_menu_confirm_current));
save_confirmation = memnew(ConfirmationDialog); save_confirmation = memnew(ConfirmationDialog);
save_confirmation->add_button(TTR("Don't Save"), DisplayServer::get_singleton()->get_swap_cancel_ok(), "discard"); save_confirmation->add_button(TTR("Don't Save"), DisplayServer::get_singleton()->get_swap_cancel_ok(), "discard");
gui_base->add_child(save_confirmation); gui_base->add_child(save_confirmation);
save_confirmation->set_min_size(Vector2(450.0 * EDSCALE, 0)); save_confirmation->set_min_size(Vector2(450.0 * EDSCALE, 0));
save_confirmation->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current)); save_confirmation->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_menu_confirm_current));
save_confirmation->connect("custom_action", callable_mp(this, &EditorNode::_discard_changes)); save_confirmation->connect("custom_action", callable_mp(this, &EditorNode::_discard_changes));
save_confirmation->connect("canceled", callable_mp(this, &EditorNode::_cancel_close_scene_tab)); save_confirmation->connect("canceled", callable_mp(this, &EditorNode::_cancel_close_scene_tab));
@ -7280,7 +7280,7 @@ EditorNode::EditorNode() {
gradle_build_manage_templates->set_text(TTR("Android build template is missing, please install relevant templates.")); gradle_build_manage_templates->set_text(TTR("Android build template is missing, please install relevant templates."));
gradle_build_manage_templates->set_ok_button_text(TTR("Manage Templates")); gradle_build_manage_templates->set_ok_button_text(TTR("Manage Templates"));
gradle_build_manage_templates->add_button(TTR("Install from file"))->connect(SceneStringName(pressed), callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE)); gradle_build_manage_templates->add_button(TTR("Install from file"))->connect(SceneStringName(pressed), callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE));
gradle_build_manage_templates->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_MANAGE_EXPORT_TEMPLATES)); gradle_build_manage_templates->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_MANAGE_EXPORT_TEMPLATES));
gui_base->add_child(gradle_build_manage_templates); gui_base->add_child(gradle_build_manage_templates);
file_android_build_source = memnew(EditorFileDialog); file_android_build_source = memnew(EditorFileDialog);
@ -7304,7 +7304,7 @@ EditorNode::EditorNode() {
install_android_build_template = memnew(ConfirmationDialog); install_android_build_template = memnew(ConfirmationDialog);
install_android_build_template->set_ok_button_text(TTR("Install")); install_android_build_template->set_ok_button_text(TTR("Install"));
install_android_build_template->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current)); install_android_build_template->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_menu_confirm_current));
install_android_build_template->add_child(vbox); install_android_build_template->add_child(vbox);
install_android_build_template->set_min_size(Vector2(500.0 * EDSCALE, 0)); install_android_build_template->set_min_size(Vector2(500.0 * EDSCALE, 0));
gui_base->add_child(install_android_build_template); gui_base->add_child(install_android_build_template);
@ -7312,7 +7312,7 @@ EditorNode::EditorNode() {
remove_android_build_template = memnew(ConfirmationDialog); remove_android_build_template = memnew(ConfirmationDialog);
remove_android_build_template->set_ok_button_text(TTR("Show in File Manager")); remove_android_build_template->set_ok_button_text(TTR("Show in File Manager"));
remove_android_build_template->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(FILE_EXPLORE_ANDROID_BUILD_TEMPLATES)); remove_android_build_template->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_menu_option).bind(FILE_EXPLORE_ANDROID_BUILD_TEMPLATES));
gui_base->add_child(remove_android_build_template); gui_base->add_child(remove_android_build_template);
file_templates = memnew(EditorFileDialog); file_templates = memnew(EditorFileDialog);
@ -7378,8 +7378,8 @@ EditorNode::EditorNode() {
vbc->add_child(disk_changed_list); vbc->add_child(disk_changed_list);
disk_changed_list->set_v_size_flags(Control::SIZE_EXPAND_FILL); disk_changed_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
disk_changed->connect("confirmed", callable_mp(this, &EditorNode::_reload_modified_scenes)); disk_changed->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_reload_modified_scenes));
disk_changed->connect("confirmed", callable_mp(this, &EditorNode::_reload_project_settings)); disk_changed->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_reload_project_settings));
disk_changed->set_ok_button_text(TTR("Discard local changes and reload")); disk_changed->set_ok_button_text(TTR("Discard local changes and reload"));
disk_changed->add_button(TTR("Keep local changes and overwrite"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave"); disk_changed->add_button(TTR("Keep local changes and overwrite"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");
@ -7512,7 +7512,7 @@ EditorNode::EditorNode() {
open_imported = memnew(ConfirmationDialog); open_imported = memnew(ConfirmationDialog);
open_imported->set_ok_button_text(TTR("Open Anyway")); open_imported->set_ok_button_text(TTR("Open Anyway"));
new_inherited_button = open_imported->add_button(TTR("New Inherited"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "inherit"); new_inherited_button = open_imported->add_button(TTR("New Inherited"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "inherit");
open_imported->connect("confirmed", callable_mp(this, &EditorNode::_open_imported)); open_imported->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_open_imported));
open_imported->connect("custom_action", callable_mp(this, &EditorNode::_inherit_imported)); open_imported->connect("custom_action", callable_mp(this, &EditorNode::_inherit_imported));
gui_base->add_child(open_imported); gui_base->add_child(open_imported);
@ -7548,7 +7548,7 @@ EditorNode::EditorNode() {
pick_main_scene = memnew(ConfirmationDialog); pick_main_scene = memnew(ConfirmationDialog);
gui_base->add_child(pick_main_scene); gui_base->add_child(pick_main_scene);
pick_main_scene->set_ok_button_text(TTR("Select")); pick_main_scene->set_ok_button_text(TTR("Select"));
pick_main_scene->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_PICK_MAIN_SCENE)); pick_main_scene->connect(SceneStringName(confirmed), callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_PICK_MAIN_SCENE));
select_current_scene_button = pick_main_scene->add_button(TTR("Select Current"), true, "select_current"); select_current_scene_button = pick_main_scene->add_button(TTR("Select Current"), true, "select_current");
pick_main_scene->connect("custom_action", callable_mp(this, &EditorNode::_pick_main_scene_custom_action)); pick_main_scene->connect("custom_action", callable_mp(this, &EditorNode::_pick_main_scene_custom_action));

View File

@ -850,7 +850,7 @@ EditorPropertyLayersGrid::EditorPropertyLayersGrid() {
rename_dialog->set_ok_button_text(TTR("Rename")); rename_dialog->set_ok_button_text(TTR("Rename"));
add_child(rename_dialog); add_child(rename_dialog);
rename_dialog->register_text_enter(rename_dialog_text); rename_dialog->register_text_enter(rename_dialog_text);
rename_dialog->connect("confirmed", callable_mp(this, &EditorPropertyLayersGrid::_rename_operation_confirm)); rename_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorPropertyLayersGrid::_rename_operation_confirm));
layer_rename = memnew(PopupMenu); layer_rename = memnew(PopupMenu);
layer_rename->add_item(TTR("Rename layer"), 0); layer_rename->add_item(TTR("Rename layer"), 0);
add_child(layer_rename); add_child(layer_rename);

View File

@ -261,7 +261,7 @@ String EditorQuickOpen::get_base_type() const {
void EditorQuickOpen::_notification(int p_what) { void EditorQuickOpen::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_ENTER_TREE: { case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &EditorQuickOpen::_confirmed)); connect(SceneStringName(confirmed), callable_mp(this, &EditorQuickOpen::_confirmed));
search_box->set_clear_button_enabled(true); search_box->set_clear_button_enabled(true);
} break; } break;
@ -278,7 +278,7 @@ void EditorQuickOpen::_notification(int p_what) {
} break; } break;
case NOTIFICATION_EXIT_TREE: { case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &EditorQuickOpen::_confirmed)); disconnect(SceneStringName(confirmed), callable_mp(this, &EditorQuickOpen::_confirmed));
} break; } break;
} }
} }

View File

@ -373,7 +373,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
duplicate_resources_dialog = memnew(ConfirmationDialog); duplicate_resources_dialog = memnew(ConfirmationDialog);
add_child(duplicate_resources_dialog); add_child(duplicate_resources_dialog);
duplicate_resources_dialog->set_title(TTR("Make Unique (Recursive)")); duplicate_resources_dialog->set_title(TTR("Make Unique (Recursive)"));
duplicate_resources_dialog->connect("confirmed", callable_mp(this, &EditorResourcePicker::_duplicate_selected_resources)); duplicate_resources_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorResourcePicker::_duplicate_selected_resources));
VBoxContainer *vb = memnew(VBoxContainer); VBoxContainer *vb = memnew(VBoxContainer);
duplicate_resources_dialog->add_child(vb); duplicate_resources_dialog->add_child(vb);

View File

@ -205,7 +205,7 @@ EditorRunNative::EditorRunNative() {
run_native_confirm = memnew(ConfirmationDialog); run_native_confirm = memnew(ConfirmationDialog);
add_child(run_native_confirm); add_child(run_native_confirm);
run_native_confirm->connect("confirmed", callable_mp(this, &EditorRunNative::_confirm_run_native)); run_native_confirm->connect(SceneStringName(confirmed), callable_mp(this, &EditorRunNative::_confirm_run_native));
set_process(true); set_process(true);
} }

View File

@ -809,7 +809,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
// Adding event dialog // Adding event dialog
shortcut_editor = memnew(InputEventConfigurationDialog); shortcut_editor = memnew(InputEventConfigurationDialog);
shortcut_editor->connect("confirmed", callable_mp(this, &EditorSettingsDialog::_event_config_confirmed)); shortcut_editor->connect(SceneStringName(confirmed), callable_mp(this, &EditorSettingsDialog::_event_config_confirmed));
shortcut_editor->set_allowed_input_types(INPUT_KEY); shortcut_editor->set_allowed_input_types(INPUT_KEY);
add_child(shortcut_editor); add_child(shortcut_editor);

View File

@ -1051,7 +1051,7 @@ ExportTemplateManager::ExportTemplateManager() {
uninstall_confirm = memnew(ConfirmationDialog); uninstall_confirm = memnew(ConfirmationDialog);
uninstall_confirm->set_title(TTR("Uninstall Template")); uninstall_confirm->set_title(TTR("Uninstall Template"));
add_child(uninstall_confirm); add_child(uninstall_confirm);
uninstall_confirm->connect("confirmed", callable_mp(this, &ExportTemplateManager::_uninstall_template_confirmed)); uninstall_confirm->connect(SceneStringName(confirmed), callable_mp(this, &ExportTemplateManager::_uninstall_template_confirmed));
install_file_dialog = memnew(FileDialog); install_file_dialog = memnew(FileDialog);
install_file_dialog->set_title(TTR("Select Template File")); install_file_dialog->set_title(TTR("Select Template File"));
@ -1065,5 +1065,5 @@ ExportTemplateManager::ExportTemplateManager() {
hide_dialog_accept = memnew(AcceptDialog); hide_dialog_accept = memnew(AcceptDialog);
hide_dialog_accept->set_text(TTR("The templates will continue to download.\nYou may experience a short editor freeze when they finish.")); hide_dialog_accept->set_text(TTR("The templates will continue to download.\nYou may experience a short editor freeze when they finish."));
add_child(hide_dialog_accept); add_child(hide_dialog_accept);
hide_dialog_accept->connect("confirmed", callable_mp(this, &ExportTemplateManager::_hide_dialog)); hide_dialog_accept->connect(SceneStringName(confirmed), callable_mp(this, &ExportTemplateManager::_hide_dialog));
} }

View File

@ -107,7 +107,7 @@ void ProjectExportDialog::_notification(int p_what) {
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
duplicate_preset->set_icon(presets->get_editor_theme_icon(SNAME("Duplicate"))); duplicate_preset->set_icon(presets->get_editor_theme_icon(SNAME("Duplicate")));
delete_preset->set_icon(presets->get_editor_theme_icon(SNAME("Remove"))); delete_preset->set_icon(presets->get_editor_theme_icon(SNAME("Remove")));
connect("confirmed", callable_mp(this, &ProjectExportDialog::_export_pck_zip)); connect(SceneStringName(confirmed), callable_mp(this, &ProjectExportDialog::_export_pck_zip));
_update_export_all(); _update_export_all();
} break; } break;
} }
@ -1483,7 +1483,7 @@ ProjectExportDialog::ProjectExportDialog() {
delete_confirm = memnew(ConfirmationDialog); delete_confirm = memnew(ConfirmationDialog);
add_child(delete_confirm); add_child(delete_confirm);
delete_confirm->set_ok_button_text(TTR("Delete")); delete_confirm->set_ok_button_text(TTR("Delete"));
delete_confirm->connect("confirmed", callable_mp(this, &ProjectExportDialog::_delete_preset_confirm)); delete_confirm->connect(SceneStringName(confirmed), callable_mp(this, &ProjectExportDialog::_delete_preset_confirm));
// Export buttons, dialogs and errors. // Export buttons, dialogs and errors.

View File

@ -44,7 +44,7 @@ void FBXImporterManager::_notification(int p_what) {
} break; } break;
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
connect("confirmed", callable_mp(this, &FBXImporterManager::_path_confirmed)); connect(SceneStringName(confirmed), callable_mp(this, &FBXImporterManager::_path_confirmed));
} break; } break;
} }
} }

View File

@ -4111,7 +4111,7 @@ FileSystemDock::FileSystemDock() {
add_child(overwrite_dialog); add_child(overwrite_dialog);
overwrite_dialog->set_ok_button_text(TTR("Overwrite")); overwrite_dialog->set_ok_button_text(TTR("Overwrite"));
overwrite_dialog->add_button(TTR("Keep Both"), true)->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_overwrite_dialog_action).bind(false)); overwrite_dialog->add_button(TTR("Keep Both"), true)->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_overwrite_dialog_action).bind(false));
overwrite_dialog->connect("confirmed", callable_mp(this, &FileSystemDock::_overwrite_dialog_action).bind(true)); overwrite_dialog->connect(SceneStringName(confirmed), callable_mp(this, &FileSystemDock::_overwrite_dialog_action).bind(true));
VBoxContainer *overwrite_dialog_vb = memnew(VBoxContainer); VBoxContainer *overwrite_dialog_vb = memnew(VBoxContainer);
overwrite_dialog->add_child(overwrite_dialog_vb); overwrite_dialog->add_child(overwrite_dialog_vb);
@ -4138,7 +4138,7 @@ FileSystemDock::FileSystemDock() {
duplicate_dialog->set_ok_button_text(TTR("Duplicate")); duplicate_dialog->set_ok_button_text(TTR("Duplicate"));
add_child(duplicate_dialog); add_child(duplicate_dialog);
duplicate_dialog->register_text_enter(duplicate_dialog_text); duplicate_dialog->register_text_enter(duplicate_dialog_text);
duplicate_dialog->connect("confirmed", callable_mp(this, &FileSystemDock::_duplicate_operation_confirm)); duplicate_dialog->connect(SceneStringName(confirmed), callable_mp(this, &FileSystemDock::_duplicate_operation_confirm));
make_dir_dialog = memnew(DirectoryCreateDialog); make_dir_dialog = memnew(DirectoryCreateDialog);
add_child(make_dir_dialog); add_child(make_dir_dialog);
@ -4146,7 +4146,7 @@ FileSystemDock::FileSystemDock() {
make_scene_dialog = memnew(SceneCreateDialog); make_scene_dialog = memnew(SceneCreateDialog);
add_child(make_scene_dialog); add_child(make_scene_dialog);
make_scene_dialog->connect("confirmed", callable_mp(this, &FileSystemDock::_make_scene_confirm)); make_scene_dialog->connect(SceneStringName(confirmed), callable_mp(this, &FileSystemDock::_make_scene_confirm));
make_script_dialog = memnew(ScriptCreateDialog); make_script_dialog = memnew(ScriptCreateDialog);
make_script_dialog->set_title(TTR("Create Script")); make_script_dialog->set_title(TTR("Create Script"));

View File

@ -400,7 +400,7 @@ void GroupSettingsEditor::show_message(const String &p_message) {
void GroupSettingsEditor::_show_remove_dialog() { void GroupSettingsEditor::_show_remove_dialog() {
if (!remove_dialog) { if (!remove_dialog) {
remove_dialog = memnew(ConfirmationDialog); remove_dialog = memnew(ConfirmationDialog);
remove_dialog->connect("confirmed", callable_mp(this, &GroupSettingsEditor::_confirm_delete)); remove_dialog->connect(SceneStringName(confirmed), callable_mp(this, &GroupSettingsEditor::_confirm_delete));
VBoxContainer *vbox = memnew(VBoxContainer); VBoxContainer *vbox = memnew(VBoxContainer);
remove_label = memnew(Label); remove_label = memnew(Label);
@ -431,7 +431,7 @@ void GroupSettingsEditor::_show_rename_dialog() {
if (!rename_group_dialog) { if (!rename_group_dialog) {
rename_group_dialog = memnew(ConfirmationDialog); rename_group_dialog = memnew(ConfirmationDialog);
rename_group_dialog->set_title(TTR("Rename Group")); rename_group_dialog->set_title(TTR("Rename Group"));
rename_group_dialog->connect("confirmed", callable_mp(this, &GroupSettingsEditor::_confirm_rename)); rename_group_dialog->connect(SceneStringName(confirmed), callable_mp(this, &GroupSettingsEditor::_confirm_rename));
VBoxContainer *vbc = memnew(VBoxContainer); VBoxContainer *vbc = memnew(VBoxContainer);
rename_group_dialog->add_child(vbc); rename_group_dialog->add_child(vbc);

View File

@ -607,7 +607,7 @@ void GroupsEditor::_show_add_group_dialog() {
if (!add_group_dialog) { if (!add_group_dialog) {
add_group_dialog = memnew(ConfirmationDialog); add_group_dialog = memnew(ConfirmationDialog);
add_group_dialog->set_title(TTR("Create New Group")); add_group_dialog->set_title(TTR("Create New Group"));
add_group_dialog->connect("confirmed", callable_mp(this, &GroupsEditor::_confirm_add)); add_group_dialog->connect(SceneStringName(confirmed), callable_mp(this, &GroupsEditor::_confirm_add));
VBoxContainer *vbc = memnew(VBoxContainer); VBoxContainer *vbc = memnew(VBoxContainer);
add_group_dialog->add_child(vbc); add_group_dialog->add_child(vbc);
@ -673,7 +673,7 @@ void GroupsEditor::_show_rename_group_dialog() {
if (!rename_group_dialog) { if (!rename_group_dialog) {
rename_group_dialog = memnew(ConfirmationDialog); rename_group_dialog = memnew(ConfirmationDialog);
rename_group_dialog->set_title(TTR("Rename Group")); rename_group_dialog->set_title(TTR("Rename Group"));
rename_group_dialog->connect("confirmed", callable_mp(this, &GroupsEditor::_confirm_rename)); rename_group_dialog->connect(SceneStringName(confirmed), callable_mp(this, &GroupsEditor::_confirm_rename));
VBoxContainer *vbc = memnew(VBoxContainer); VBoxContainer *vbc = memnew(VBoxContainer);
rename_group_dialog->add_child(vbc); rename_group_dialog->add_child(vbc);
@ -729,7 +729,7 @@ void GroupsEditor::_show_rename_group_dialog() {
void GroupsEditor::_show_remove_group_dialog() { void GroupsEditor::_show_remove_group_dialog() {
if (!remove_group_dialog) { if (!remove_group_dialog) {
remove_group_dialog = memnew(ConfirmationDialog); remove_group_dialog = memnew(ConfirmationDialog);
remove_group_dialog->connect("confirmed", callable_mp(this, &GroupsEditor::_confirm_delete)); remove_group_dialog->connect(SceneStringName(confirmed), callable_mp(this, &GroupsEditor::_confirm_delete));
VBoxContainer *vbox = memnew(VBoxContainer); VBoxContainer *vbox = memnew(VBoxContainer);
remove_label = memnew(Label); remove_label = memnew(Label);

View File

@ -2300,7 +2300,7 @@ EditorFileDialog::EditorFileDialog() {
dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES); dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES);
_update_drives(); _update_drives();
connect("confirmed", callable_mp(this, &EditorFileDialog::_action_pressed)); connect(SceneStringName(confirmed), callable_mp(this, &EditorFileDialog::_action_pressed));
item_list->connect(SceneStringName(item_selected), callable_mp(this, &EditorFileDialog::_item_selected), CONNECT_DEFERRED); item_list->connect(SceneStringName(item_selected), callable_mp(this, &EditorFileDialog::_item_selected), CONNECT_DEFERRED);
item_list->connect("multi_selected", callable_mp(this, &EditorFileDialog::_multi_selected), CONNECT_DEFERRED); item_list->connect("multi_selected", callable_mp(this, &EditorFileDialog::_multi_selected), CONNECT_DEFERRED);
item_list->connect("item_activated", callable_mp(this, &EditorFileDialog::_item_dc_selected).bind()); item_list->connect("item_activated", callable_mp(this, &EditorFileDialog::_item_dc_selected).bind());
@ -2311,14 +2311,14 @@ EditorFileDialog::EditorFileDialog() {
confirm_save = memnew(ConfirmationDialog); confirm_save = memnew(ConfirmationDialog);
add_child(confirm_save); add_child(confirm_save);
confirm_save->connect("confirmed", callable_mp(this, &EditorFileDialog::_save_confirm_pressed)); confirm_save->connect(SceneStringName(confirmed), callable_mp(this, &EditorFileDialog::_save_confirm_pressed));
dep_remove_dialog = memnew(DependencyRemoveDialog); dep_remove_dialog = memnew(DependencyRemoveDialog);
add_child(dep_remove_dialog); add_child(dep_remove_dialog);
global_remove_dialog = memnew(ConfirmationDialog); global_remove_dialog = memnew(ConfirmationDialog);
global_remove_dialog->set_text(TTR("Remove the selected files? For safety only files and empty directories can be deleted from here. (Cannot be undone.)\nDepending on your filesystem configuration, the files will either be moved to the system trash or deleted permanently.")); global_remove_dialog->set_text(TTR("Remove the selected files? For safety only files and empty directories can be deleted from here. (Cannot be undone.)\nDepending on your filesystem configuration, the files will either be moved to the system trash or deleted permanently."));
global_remove_dialog->connect("confirmed", callable_mp(this, &EditorFileDialog::_delete_files_global)); global_remove_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorFileDialog::_delete_files_global));
add_child(global_remove_dialog); add_child(global_remove_dialog);
makedialog = memnew(ConfirmationDialog); makedialog = memnew(ConfirmationDialog);
@ -2331,7 +2331,7 @@ EditorFileDialog::EditorFileDialog() {
makevb->add_margin_child(TTR("Name:"), makedirname); makevb->add_margin_child(TTR("Name:"), makedirname);
add_child(makedialog); add_child(makedialog);
makedialog->register_text_enter(makedirname); makedialog->register_text_enter(makedirname);
makedialog->connect("confirmed", callable_mp(this, &EditorFileDialog::_make_dir_confirm)); makedialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorFileDialog::_make_dir_confirm));
error_dialog = memnew(AcceptDialog); error_dialog = memnew(AcceptDialog);
add_child(error_dialog); add_child(error_dialog);

View File

@ -1690,7 +1690,7 @@ void SceneTreeDialog::_notification(int p_what) {
} break; } break;
case NOTIFICATION_ENTER_TREE: { case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &SceneTreeDialog::_select)); connect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDialog::_select));
} break; } break;
case NOTIFICATION_THEME_CHANGED: { case NOTIFICATION_THEME_CHANGED: {
@ -1702,7 +1702,7 @@ void SceneTreeDialog::_notification(int p_what) {
} break; } break;
case NOTIFICATION_EXIT_TREE: { case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &SceneTreeDialog::_select)); disconnect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDialog::_select));
} break; } break;
} }
} }

View File

@ -1256,7 +1256,7 @@ void SceneImportSettingsDialog::_update_theme_item_cache() {
void SceneImportSettingsDialog::_notification(int p_what) { void SceneImportSettingsDialog::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
connect("confirmed", callable_mp(this, &SceneImportSettingsDialog::_re_import)); connect(SceneStringName(confirmed), callable_mp(this, &SceneImportSettingsDialog::_re_import));
} break; } break;
case NOTIFICATION_THEME_CHANGED: { case NOTIFICATION_THEME_CHANGED: {
@ -1810,7 +1810,7 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
external_path_tree = memnew(Tree); external_path_tree = memnew(Tree);
external_paths->add_child(external_path_tree); external_paths->add_child(external_path_tree);
external_path_tree->connect("button_clicked", callable_mp(this, &SceneImportSettingsDialog::_browse_save_callback)); external_path_tree->connect("button_clicked", callable_mp(this, &SceneImportSettingsDialog::_browse_save_callback));
external_paths->connect("confirmed", callable_mp(this, &SceneImportSettingsDialog::_save_dir_confirm)); external_paths->connect(SceneStringName(confirmed), callable_mp(this, &SceneImportSettingsDialog::_save_dir_confirm));
external_path_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); external_path_tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
external_path_tree->set_columns(3); external_path_tree->set_columns(3);
external_path_tree->set_column_titles_visible(true); external_path_tree->set_column_titles_visible(true);

View File

@ -41,7 +41,7 @@ void AudioStreamImportSettingsDialog::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", callable_mp(this, &AudioStreamImportSettingsDialog::_preview_changed)); AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", callable_mp(this, &AudioStreamImportSettingsDialog::_preview_changed));
connect("confirmed", callable_mp(this, &AudioStreamImportSettingsDialog::_reimport)); connect(SceneStringName(confirmed), callable_mp(this, &AudioStreamImportSettingsDialog::_reimport));
} break; } break;
case NOTIFICATION_THEME_CHANGED: { case NOTIFICATION_THEME_CHANGED: {

View File

@ -924,7 +924,7 @@ String DynamicFontImportSettingsDialog::_pad_zeros(const String &p_hex) const {
void DynamicFontImportSettingsDialog::_notification(int p_what) { void DynamicFontImportSettingsDialog::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
connect("confirmed", callable_mp(this, &DynamicFontImportSettingsDialog::_re_import)); connect(SceneStringName(confirmed), callable_mp(this, &DynamicFontImportSettingsDialog::_re_import));
} break; } break;
case NOTIFICATION_THEME_CHANGED: { case NOTIFICATION_THEME_CHANGED: {

View File

@ -834,7 +834,7 @@ ImportDock::ImportDock() {
reimport_confirm = memnew(ConfirmationDialog); reimport_confirm = memnew(ConfirmationDialog);
content->add_child(reimport_confirm); content->add_child(reimport_confirm);
reimport_confirm->connect("confirmed", callable_mp(this, &ImportDock::_reimport_and_cleanup)); reimport_confirm->connect(SceneStringName(confirmed), callable_mp(this, &ImportDock::_reimport_and_cleanup));
VBoxContainer *vbc_confirm = memnew(VBoxContainer()); VBoxContainer *vbc_confirm = memnew(VBoxContainer());
cleanup_warning = memnew(Label(TTR("The imported resource is currently loaded. All instances will be replaced and undo history will be cleared."))); cleanup_warning = memnew(Label(TTR("The imported resource is currently loaded. All instances will be replaced and undo history will be cleared.")));

View File

@ -774,7 +774,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
bottom_label->set_text(TTR("This cannot be undone. Are you sure?")); bottom_label->set_text(TTR("This cannot be undone. Are you sure?"));
container->add_child(bottom_label); container->add_child(bottom_label);
unique_resources_confirmation->connect("confirmed", callable_mp(this, &InspectorDock::_menu_confirm_current)); unique_resources_confirmation->connect(SceneStringName(confirmed), callable_mp(this, &InspectorDock::_menu_confirm_current));
info_dialog = memnew(AcceptDialog); info_dialog = memnew(AcceptDialog);
EditorNode::get_singleton()->get_gui_base()->add_child(info_dialog); EditorNode::get_singleton()->get_gui_base()->add_child(info_dialog);

View File

@ -169,7 +169,7 @@ void AbstractPolygon2DEditor::_notification(int p_what) {
button_edit->set_pressed(true); button_edit->set_pressed(true);
get_tree()->connect("node_removed", callable_mp(this, &AbstractPolygon2DEditor::_node_removed)); get_tree()->connect("node_removed", callable_mp(this, &AbstractPolygon2DEditor::_node_removed));
create_resource->connect("confirmed", callable_mp(this, &AbstractPolygon2DEditor::_create_resource)); create_resource->connect(SceneStringName(confirmed), callable_mp(this, &AbstractPolygon2DEditor::_create_resource));
} break; } break;
} }
} }

View File

@ -804,7 +804,7 @@ AnimationLibraryEditor::AnimationLibraryEditor() {
add_library_validate = memnew(Label); add_library_validate = memnew(Label);
dialog_vb->add_child(add_library_validate); dialog_vb->add_child(add_library_validate);
add_library_dialog->add_child(dialog_vb); add_library_dialog->add_child(dialog_vb);
add_library_dialog->connect("confirmed", callable_mp(this, &AnimationLibraryEditor::_add_library_confirm)); add_library_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationLibraryEditor::_add_library_confirm));
add_library_dialog->register_text_enter(add_library_name); add_library_dialog->register_text_enter(add_library_name);
VBoxContainer *vb = memnew(VBoxContainer); VBoxContainer *vb = memnew(VBoxContainer);

View File

@ -1951,7 +1951,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
delete_dialog = memnew(ConfirmationDialog); delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog); add_child(delete_dialog);
delete_dialog->connect(SNAME("confirmed"), callable_mp(this, &AnimationPlayerEditor::_animation_remove_confirmed)); delete_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationPlayerEditor::_animation_remove_confirmed));
tool_anim = memnew(MenuButton); tool_anim = memnew(MenuButton);
tool_anim->set_shortcut_context(this); tool_anim->set_shortcut_context(this);
@ -2056,7 +2056,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(AnimationPlayerEditorPlugin *p_plug
error_dialog->set_title(TTR("Error!")); error_dialog->set_title(TTR("Error!"));
name_dialog->add_child(error_dialog); name_dialog->add_child(error_dialog);
name_dialog->connect(SNAME("confirmed"), callable_mp(this, &AnimationPlayerEditor::_animation_name_edited)); name_dialog->connect(SceneStringName(confirmed), callable_mp(this, &AnimationPlayerEditor::_animation_name_edited));
blend_editor.dialog = memnew(AcceptDialog); blend_editor.dialog = memnew(AcceptDialog);
blend_editor.dialog->set_title(TTR("Cross-Animation Blend Times")); blend_editor.dialog->set_title(TTR("Cross-Animation Blend Times"));

View File

@ -620,7 +620,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
asset_installer = memnew(EditorAssetInstaller); asset_installer = memnew(EditorAssetInstaller);
panel->add_child(asset_installer); panel->add_child(asset_installer);
asset_installer->connect("confirmed", callable_mp(this, &EditorAssetLibraryItemDownload::_close)); asset_installer->connect(SceneStringName(confirmed), callable_mp(this, &EditorAssetLibraryItemDownload::_close));
prev_status = -1; prev_status = -1;
@ -1427,7 +1427,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
description = memnew(EditorAssetLibraryItemDescription); description = memnew(EditorAssetLibraryItemDescription);
add_child(description); add_child(description);
description->connect("confirmed", callable_mp(this, &EditorAssetLibrary::_install_asset)); description->connect(SceneStringName(confirmed), callable_mp(this, &EditorAssetLibrary::_install_asset));
description->configure(r["title"], r["asset_id"], category_map[r["category_id"]], r["category_id"], r["author"], r["author_id"], r["cost"], r["version"], r["version_string"], r["description"], r["download_url"], r["browse_url"], r["download_hash"]); description->configure(r["title"], r["asset_id"], category_map[r["category_id"]], r["category_id"], r["author"], r["author_id"], r["cost"], r["version"], r["version_string"], r["description"], r["download_url"], r["browse_url"], r["download_hash"]);

View File

@ -273,7 +273,7 @@ BonePicker::~BonePicker() {
void BoneMapper::create_editor() { void BoneMapper::create_editor() {
// Create Bone picker. // Create Bone picker.
picker = memnew(BonePicker(skeleton)); picker = memnew(BonePicker(skeleton));
picker->connect("confirmed", callable_mp(this, &BoneMapper::_apply_picker_selection)); picker->connect(SceneStringName(confirmed), callable_mp(this, &BoneMapper::_apply_picker_selection));
add_child(picker, false, INTERNAL_MODE_FRONT); add_child(picker, false, INTERNAL_MODE_FRONT);
profile_selector = memnew(EditorPropertyResource); profile_selector = memnew(EditorPropertyResource);

View File

@ -5609,7 +5609,7 @@ CanvasItemEditor::CanvasItemEditor() {
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_clear_pose", TTR("Clear Pose"), KeyModifierMask::SHIFT | Key::K), ANIM_CLEAR_POSE); p->add_shortcut(ED_SHORTCUT("canvas_item_editor/anim_clear_pose", TTR("Clear Pose"), KeyModifierMask::SHIFT | Key::K), ANIM_CLEAR_POSE);
snap_dialog = memnew(SnapDialog); snap_dialog = memnew(SnapDialog);
snap_dialog->connect("confirmed", callable_mp(this, &CanvasItemEditor::_snap_changed)); snap_dialog->connect(SceneStringName(confirmed), callable_mp(this, &CanvasItemEditor::_snap_changed));
add_child(snap_dialog); add_child(snap_dialog);
select_sb = Ref<StyleBoxTexture>(memnew(StyleBoxTexture)); select_sb = Ref<StyleBoxTexture>(memnew(StyleBoxTexture));
@ -6266,7 +6266,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(CanvasItemEditor *p_canvas_it
texture_node_type_selector = memnew(AcceptDialog); texture_node_type_selector = memnew(AcceptDialog);
EditorNode::get_singleton()->get_gui_base()->add_child(texture_node_type_selector); EditorNode::get_singleton()->get_gui_base()->add_child(texture_node_type_selector);
texture_node_type_selector->set_title(TTR("Change Default Type")); texture_node_type_selector->set_title(TTR("Change Default Type"));
texture_node_type_selector->connect("confirmed", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_confirmed)); texture_node_type_selector->connect(SceneStringName(confirmed), callable_mp(this, &CanvasItemEditorViewport::_on_change_type_confirmed));
texture_node_type_selector->connect("canceled", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_closed)); texture_node_type_selector->connect("canceled", callable_mp(this, &CanvasItemEditorViewport::_on_change_type_closed));
VBoxContainer *vbc = memnew(VBoxContainer); VBoxContainer *vbc = memnew(VBoxContainer);

View File

@ -305,7 +305,7 @@ CPUParticles2DEditorPlugin::CPUParticles2DEditorPlugin() {
toolbar->add_child(emission_mask); toolbar->add_child(emission_mask);
emission_mask->connect("confirmed", callable_mp(this, &CPUParticles2DEditorPlugin::_generate_emission_mask)); emission_mask->connect(SceneStringName(confirmed), callable_mp(this, &CPUParticles2DEditorPlugin::_generate_emission_mask));
} }
CPUParticles2DEditorPlugin::~CPUParticles2DEditorPlugin() { CPUParticles2DEditorPlugin::~CPUParticles2DEditorPlugin() {

View File

@ -187,7 +187,7 @@ CPUParticles3DEditor::CPUParticles3DEditor() {
add_child(generate_aabb); add_child(generate_aabb);
generate_aabb->connect("confirmed", callable_mp(this, &CPUParticles3DEditor::_generate_aabb)); generate_aabb->connect(SceneStringName(confirmed), callable_mp(this, &CPUParticles3DEditor::_generate_aabb));
} }
void CPUParticles3DEditorPlugin::edit(Object *p_object) { void CPUParticles3DEditorPlugin::edit(Object *p_object) {

View File

@ -401,7 +401,7 @@ GPUParticles2DEditorPlugin::GPUParticles2DEditorPlugin() {
toolbar->add_child(generate_visibility_rect); toolbar->add_child(generate_visibility_rect);
generate_visibility_rect->connect("confirmed", callable_mp(this, &GPUParticles2DEditorPlugin::_generate_visibility_rect)); generate_visibility_rect->connect(SceneStringName(confirmed), callable_mp(this, &GPUParticles2DEditorPlugin::_generate_visibility_rect));
emission_mask = memnew(ConfirmationDialog); emission_mask = memnew(ConfirmationDialog);
emission_mask->set_title(TTR("Load Emission Mask")); emission_mask->set_title(TTR("Load Emission Mask"));
@ -423,7 +423,7 @@ GPUParticles2DEditorPlugin::GPUParticles2DEditorPlugin() {
toolbar->add_child(emission_mask); toolbar->add_child(emission_mask);
emission_mask->connect("confirmed", callable_mp(this, &GPUParticles2DEditorPlugin::_generate_emission_mask)); emission_mask->connect(SceneStringName(confirmed), callable_mp(this, &GPUParticles2DEditorPlugin::_generate_emission_mask));
} }
GPUParticles2DEditorPlugin::~GPUParticles2DEditorPlugin() { GPUParticles2DEditorPlugin::~GPUParticles2DEditorPlugin() {

View File

@ -221,7 +221,7 @@ GPUParticles3DEditorBase::GPUParticles3DEditorBase() {
emd_vb->add_margin_child(TTR("Emission Source:"), emission_fill); emd_vb->add_margin_child(TTR("Emission Source:"), emission_fill);
emission_dialog->set_ok_button_text(TTR("Create")); emission_dialog->set_ok_button_text(TTR("Create"));
emission_dialog->connect("confirmed", callable_mp(this, &GPUParticles3DEditorBase::_generate_emission_points)); emission_dialog->connect(SceneStringName(confirmed), callable_mp(this, &GPUParticles3DEditorBase::_generate_emission_points));
emission_tree_dialog = memnew(SceneTreeDialog); emission_tree_dialog = memnew(SceneTreeDialog);
Vector<StringName> valid_types; Vector<StringName> valid_types;
@ -434,7 +434,7 @@ GPUParticles3DEditor::GPUParticles3DEditor() {
add_child(generate_aabb); add_child(generate_aabb);
generate_aabb->connect("confirmed", callable_mp(this, &GPUParticles3DEditor::_generate_aabb)); generate_aabb->connect(SceneStringName(confirmed), callable_mp(this, &GPUParticles3DEditor::_generate_aabb));
} }
void GPUParticles3DEditorPlugin::edit(Object *p_object) { void GPUParticles3DEditorPlugin::edit(Object *p_object) {

View File

@ -94,7 +94,7 @@ InputEventConfigContainer::InputEventConfigContainer() {
add_child(memnew(Control)); add_child(memnew(Control));
config_dialog = memnew(InputEventConfigurationDialog); config_dialog = memnew(InputEventConfigurationDialog);
config_dialog->connect("confirmed", callable_mp(this, &InputEventConfigContainer::_config_dialog_confirmed)); config_dialog->connect(SceneStringName(confirmed), callable_mp(this, &InputEventConfigContainer::_config_dialog_confirmed));
add_child(config_dialog); add_child(config_dialog);
} }

View File

@ -558,7 +558,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
outline_dialog_vbc->add_margin_child(TTR("Outline Size:"), outline_size); outline_dialog_vbc->add_margin_child(TTR("Outline Size:"), outline_size);
add_child(outline_dialog); add_child(outline_dialog);
outline_dialog->connect("confirmed", callable_mp(this, &MeshInstance3DEditor::_create_outline_mesh)); outline_dialog->connect(SceneStringName(confirmed), callable_mp(this, &MeshInstance3DEditor::_create_outline_mesh));
shape_dialog = memnew(ConfirmationDialog); shape_dialog = memnew(ConfirmationDialog);
shape_dialog->set_title(TTR("Create Collision Shape")); shape_dialog->set_title(TTR("Create Collision Shape"));
@ -596,7 +596,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
shape_dialog_vbc->add_child(shape_type); shape_dialog_vbc->add_child(shape_type);
add_child(shape_dialog); add_child(shape_dialog);
shape_dialog->connect("confirmed", callable_mp(this, &MeshInstance3DEditor::_create_collision_shape)); shape_dialog->connect(SceneStringName(confirmed), callable_mp(this, &MeshInstance3DEditor::_create_collision_shape));
err_dialog = memnew(AcceptDialog); err_dialog = memnew(AcceptDialog);
add_child(err_dialog); add_child(err_dialog);

View File

@ -8720,7 +8720,7 @@ Node3DEditor::Node3DEditor() {
snap_dialog = memnew(ConfirmationDialog); snap_dialog = memnew(ConfirmationDialog);
snap_dialog->set_title(TTR("Snap Settings")); snap_dialog->set_title(TTR("Snap Settings"));
add_child(snap_dialog); add_child(snap_dialog);
snap_dialog->connect("confirmed", callable_mp(this, &Node3DEditor::_snap_changed)); snap_dialog->connect(SceneStringName(confirmed), callable_mp(this, &Node3DEditor::_snap_changed));
snap_dialog->get_cancel_button()->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_snap_update)); snap_dialog->get_cancel_button()->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_snap_update));
VBoxContainer *snap_dialog_vbc = memnew(VBoxContainer); VBoxContainer *snap_dialog_vbc = memnew(VBoxContainer);
@ -8773,7 +8773,7 @@ Node3DEditor::Node3DEditor() {
settings_vbc->add_margin_child(TTR("View Z-Far:"), settings_zfar); settings_vbc->add_margin_child(TTR("View Z-Far:"), settings_zfar);
for (uint32_t i = 0; i < VIEWPORTS_COUNT; ++i) { for (uint32_t i = 0; i < VIEWPORTS_COUNT; ++i) {
settings_dialog->connect("confirmed", callable_mp(viewports[i], &Node3DEditorViewport::_view_settings_confirmed).bind(0.0)); settings_dialog->connect(SceneStringName(confirmed), callable_mp(viewports[i], &Node3DEditorViewport::_view_settings_confirmed).bind(0.0));
} }
/* XFORM DIALOG */ /* XFORM DIALOG */
@ -8837,7 +8837,7 @@ Node3DEditor::Node3DEditor() {
xform_type->add_item(TTR("Post")); xform_type->add_item(TTR("Post"));
xform_vbc->add_child(xform_type); xform_vbc->add_child(xform_type);
xform_dialog->connect("confirmed", callable_mp(this, &Node3DEditor::_xform_dialog_action)); xform_dialog->connect(SceneStringName(confirmed), callable_mp(this, &Node3DEditor::_xform_dialog_action));
selected = nullptr; selected = nullptr;

View File

@ -688,7 +688,7 @@ Path2DEditor::Path2DEditor() {
clear_points_dialog = memnew(ConfirmationDialog); clear_points_dialog = memnew(ConfirmationDialog);
clear_points_dialog->set_title(TTR("Please Confirm...")); clear_points_dialog->set_title(TTR("Please Confirm..."));
clear_points_dialog->set_text(TTR("Remove all curve points?")); clear_points_dialog->set_text(TTR("Remove all curve points?"));
clear_points_dialog->connect("confirmed", callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_CLEAR_POINTS)); clear_points_dialog->connect(SceneStringName(confirmed), callable_mp(this, &Path2DEditor::_mode_selected).bind(MODE_CLEAR_POINTS));
add_child(clear_points_dialog); add_child(clear_points_dialog);
PopupMenu *menu; PopupMenu *menu;

View File

@ -881,7 +881,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
clear_points_dialog = memnew(ConfirmationDialog); clear_points_dialog = memnew(ConfirmationDialog);
clear_points_dialog->set_title(TTR("Please Confirm...")); clear_points_dialog->set_title(TTR("Please Confirm..."));
clear_points_dialog->set_text(TTR("Remove all curve points?")); clear_points_dialog->set_text(TTR("Remove all curve points?"));
clear_points_dialog->connect("confirmed", callable_mp(this, &Path3DEditorPlugin::_clear_points)); clear_points_dialog->connect(SceneStringName(confirmed), callable_mp(this, &Path3DEditorPlugin::_clear_points));
topmenu_bar->add_child(clear_points_dialog); topmenu_bar->add_child(clear_points_dialog);
handle_menu = memnew(MenuButton); handle_menu = memnew(MenuButton);

View File

@ -160,7 +160,7 @@ void PluginConfigDialog::_notification(int p_what) {
} break; } break;
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
connect("confirmed", callable_mp(this, &PluginConfigDialog::_on_confirmed)); connect(SceneStringName(confirmed), callable_mp(this, &PluginConfigDialog::_on_confirmed));
get_cancel_button()->connect(SceneStringName(pressed), callable_mp(this, &PluginConfigDialog::_on_canceled)); get_cancel_button()->connect(SceneStringName(pressed), callable_mp(this, &PluginConfigDialog::_on_canceled));
} break; } break;
} }

View File

@ -1308,7 +1308,7 @@ Polygon2DEditor::Polygon2DEditor() {
uv_edit = memnew(AcceptDialog); uv_edit = memnew(AcceptDialog);
add_child(uv_edit); add_child(uv_edit);
uv_edit->set_title(TTR("Polygon 2D UV Editor")); uv_edit->set_title(TTR("Polygon 2D UV Editor"));
uv_edit->connect("confirmed", callable_mp(this, &Polygon2DEditor::_uv_edit_popup_hide)); uv_edit->connect(SceneStringName(confirmed), callable_mp(this, &Polygon2DEditor::_uv_edit_popup_hide));
uv_edit->connect("canceled", callable_mp(this, &Polygon2DEditor::_uv_edit_popup_hide)); uv_edit->connect("canceled", callable_mp(this, &Polygon2DEditor::_uv_edit_popup_hide));
VBoxContainer *uv_main_vb = memnew(VBoxContainer); VBoxContainer *uv_main_vb = memnew(VBoxContainer);

View File

@ -212,7 +212,7 @@ EditorPropertyRootMotion::EditorPropertyRootMotion() {
filter_dialog = memnew(ConfirmationDialog); filter_dialog = memnew(ConfirmationDialog);
add_child(filter_dialog); add_child(filter_dialog);
filter_dialog->set_title(TTR("Edit Filtered Tracks:")); filter_dialog->set_title(TTR("Edit Filtered Tracks:"));
filter_dialog->connect("confirmed", callable_mp(this, &EditorPropertyRootMotion::_confirmed)); filter_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorPropertyRootMotion::_confirmed));
filters = memnew(Tree); filters = memnew(Tree);
filter_dialog->add_child(filters); filter_dialog->add_child(filters);

View File

@ -399,7 +399,7 @@ void ScriptEditorQuickOpen::_confirmed() {
void ScriptEditorQuickOpen::_notification(int p_what) { void ScriptEditorQuickOpen::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_ENTER_TREE: { case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &ScriptEditorQuickOpen::_confirmed)); connect(SceneStringName(confirmed), callable_mp(this, &ScriptEditorQuickOpen::_confirmed));
search_box->set_clear_button_enabled(true); search_box->set_clear_button_enabled(true);
[[fallthrough]]; [[fallthrough]];
@ -409,7 +409,7 @@ void ScriptEditorQuickOpen::_notification(int p_what) {
} break; } break;
case NOTIFICATION_EXIT_TREE: { case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &ScriptEditorQuickOpen::_confirmed)); disconnect(SceneStringName(confirmed), callable_mp(this, &ScriptEditorQuickOpen::_confirmed));
} break; } break;
} }
} }
@ -4247,7 +4247,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
erase_tab_confirm = memnew(ConfirmationDialog); erase_tab_confirm = memnew(ConfirmationDialog);
erase_tab_confirm->set_ok_button_text(TTR("Save")); erase_tab_confirm->set_ok_button_text(TTR("Save"));
erase_tab_confirm->add_button(TTR("Discard"), DisplayServer::get_singleton()->get_swap_cancel_ok(), "discard"); erase_tab_confirm->add_button(TTR("Discard"), DisplayServer::get_singleton()->get_swap_cancel_ok(), "discard");
erase_tab_confirm->connect("confirmed", callable_mp(this, &ScriptEditor::_close_current_tab).bind(true, true)); erase_tab_confirm->connect(SceneStringName(confirmed), callable_mp(this, &ScriptEditor::_close_current_tab).bind(true, true));
erase_tab_confirm->connect("custom_action", callable_mp(this, &ScriptEditor::_close_discard_current_tab)); erase_tab_confirm->connect("custom_action", callable_mp(this, &ScriptEditor::_close_discard_current_tab));
add_child(erase_tab_confirm); add_child(erase_tab_confirm);
@ -4284,7 +4284,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
disk_changed_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); disk_changed_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL); disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL);
disk_changed->connect("confirmed", callable_mp(this, &ScriptEditor::reload_scripts).bind(false)); disk_changed->connect(SceneStringName(confirmed), callable_mp(this, &ScriptEditor::reload_scripts).bind(false));
disk_changed->set_ok_button_text(TTR("Discard local changes and reload")); disk_changed->set_ok_button_text(TTR("Discard local changes and reload"));
disk_changed->add_button(TTR("Keep local changes and overwrite"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave"); disk_changed->add_button(TTR("Keep local changes and overwrite"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");

View File

@ -618,7 +618,7 @@ Sprite2DEditor::Sprite2DEditor() {
debug_uv->add_child(h_scroll); debug_uv->add_child(h_scroll);
h_scroll->connect("value_changed", callable_mp(this, &Sprite2DEditor::_update_zoom_and_pan).unbind(1).bind(false)); h_scroll->connect("value_changed", callable_mp(this, &Sprite2DEditor::_update_zoom_and_pan).unbind(1).bind(false));
debug_uv_dialog->connect("confirmed", callable_mp(this, &Sprite2DEditor::_create_node)); debug_uv_dialog->connect(SceneStringName(confirmed), callable_mp(this, &Sprite2DEditor::_create_node));
HBoxContainer *hb = memnew(HBoxContainer); HBoxContainer *hb = memnew(HBoxContainer);
hb->add_child(memnew(Label(TTR("Simplification:")))); hb->add_child(memnew(Label(TTR("Simplification:"))));

View File

@ -2058,12 +2058,12 @@ SpriteFramesEditor::SpriteFramesEditor() {
delete_dialog = memnew(ConfirmationDialog); delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog); add_child(delete_dialog);
delete_dialog->connect("confirmed", callable_mp(this, &SpriteFramesEditor::_animation_remove_confirmed)); delete_dialog->connect(SceneStringName(confirmed), callable_mp(this, &SpriteFramesEditor::_animation_remove_confirmed));
split_sheet_dialog = memnew(ConfirmationDialog); split_sheet_dialog = memnew(ConfirmationDialog);
add_child(split_sheet_dialog); add_child(split_sheet_dialog);
split_sheet_dialog->set_title(TTR("Select Frames")); split_sheet_dialog->set_title(TTR("Select Frames"));
split_sheet_dialog->connect("confirmed", callable_mp(this, &SpriteFramesEditor::_sheet_add_frames)); split_sheet_dialog->connect(SceneStringName(confirmed), callable_mp(this, &SpriteFramesEditor::_sheet_add_frames));
HBoxContainer *split_sheet_hb = memnew(HBoxContainer); HBoxContainer *split_sheet_hb = memnew(HBoxContainer);
split_sheet_dialog->add_child(split_sheet_hb); split_sheet_dialog->add_child(split_sheet_hb);

View File

@ -1246,7 +1246,7 @@ TextShaderEditor::TextShaderEditor() {
dl->set_text(TTR("This shader has been modified on disk.\nWhat action should be taken?")); dl->set_text(TTR("This shader has been modified on disk.\nWhat action should be taken?"));
vbc->add_child(dl); vbc->add_child(dl);
disk_changed->connect("confirmed", callable_mp(this, &TextShaderEditor::_reload)); disk_changed->connect(SceneStringName(confirmed), callable_mp(this, &TextShaderEditor::_reload));
disk_changed->set_ok_button_text(TTR("Reload")); disk_changed->set_ok_button_text(TTR("Reload"));
disk_changed->add_button(TTR("Resave"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave"); disk_changed->add_button(TTR("Resave"), !DisplayServer::get_singleton()->get_swap_cancel_ok(), "resave");

View File

@ -2068,7 +2068,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
theme_item_name = memnew(LineEdit); theme_item_name = memnew(LineEdit);
edit_theme_item_vb->add_child(theme_item_name); edit_theme_item_vb->add_child(theme_item_name);
theme_item_name->connect(SceneStringName(gui_input), callable_mp(this, &ThemeItemEditorDialog::_edit_theme_item_gui_input)); theme_item_name->connect(SceneStringName(gui_input), callable_mp(this, &ThemeItemEditorDialog::_edit_theme_item_gui_input));
edit_theme_item_dialog->connect("confirmed", callable_mp(this, &ThemeItemEditorDialog::_confirm_edit_theme_item)); edit_theme_item_dialog->connect(SceneStringName(confirmed), callable_mp(this, &ThemeItemEditorDialog::_confirm_edit_theme_item));
// Import Items tab. // Import Items tab.
TabContainer *import_tc = memnew(TabContainer); TabContainer *import_tc = memnew(TabContainer);
@ -2120,7 +2120,7 @@ ThemeItemEditorDialog::ThemeItemEditorDialog(ThemeTypeEditor *p_theme_type_edito
confirm_closing_dialog = memnew(ConfirmationDialog); confirm_closing_dialog = memnew(ConfirmationDialog);
confirm_closing_dialog->set_autowrap(true); confirm_closing_dialog->set_autowrap(true);
add_child(confirm_closing_dialog); add_child(confirm_closing_dialog);
confirm_closing_dialog->connect("confirmed", callable_mp(this, &ThemeItemEditorDialog::_close_dialog)); confirm_closing_dialog->connect(SceneStringName(confirmed), callable_mp(this, &ThemeItemEditorDialog::_close_dialog));
} }
/////////////////////// ///////////////////////
@ -2260,7 +2260,7 @@ ThemeTypeDialog::ThemeTypeDialog() {
add_type_confirmation = memnew(ConfirmationDialog); add_type_confirmation = memnew(ConfirmationDialog);
add_type_confirmation->set_title(TTR("Type name is empty!")); add_type_confirmation->set_title(TTR("Type name is empty!"));
add_type_confirmation->set_text(TTR("Are you sure you want to create an empty type?")); add_type_confirmation->set_text(TTR("Are you sure you want to create an empty type?"));
add_type_confirmation->connect("confirmed", callable_mp(this, &ThemeTypeDialog::_add_type_confirmed)); add_type_confirmation->connect(SceneStringName(confirmed), callable_mp(this, &ThemeTypeDialog::_add_type_confirmed));
add_child(add_type_confirmation); add_child(add_type_confirmation);
} }

View File

@ -2733,7 +2733,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
confirm_auto_create_tiles->set_text(TTR("The atlas's texture was modified.\nWould you like to automatically create tiles in the atlas?")); confirm_auto_create_tiles->set_text(TTR("The atlas's texture was modified.\nWould you like to automatically create tiles in the atlas?"));
confirm_auto_create_tiles->set_ok_button_text(TTR("Yes")); confirm_auto_create_tiles->set_ok_button_text(TTR("Yes"));
confirm_auto_create_tiles->add_cancel_button()->set_text(TTR("No")); confirm_auto_create_tiles->add_cancel_button()->set_text(TTR("No"));
confirm_auto_create_tiles->connect("confirmed", callable_mp(this, &TileSetAtlasSourceEditor::_auto_create_tiles)); confirm_auto_create_tiles->connect(SceneStringName(confirmed), callable_mp(this, &TileSetAtlasSourceEditor::_auto_create_tiles));
confirm_auto_create_tiles->connect("canceled", callable_mp(this, &TileSetAtlasSourceEditor::_cancel_auto_create_tiles)); confirm_auto_create_tiles->connect("canceled", callable_mp(this, &TileSetAtlasSourceEditor::_cancel_auto_create_tiles));
add_child(confirm_auto_create_tiles); add_child(confirm_auto_create_tiles);

View File

@ -983,7 +983,7 @@ void TileSourceInspectorPlugin::_show_id_edit_dialog(Object *p_for_source) {
vbox->add_child(id_input); vbox->add_child(id_input);
id_input->set_max(INT_MAX); id_input->set_max(INT_MAX);
id_edit_dialog->connect("confirmed", callable_mp(this, &TileSourceInspectorPlugin::_confirm_change_id)); id_edit_dialog->connect(SceneStringName(confirmed), callable_mp(this, &TileSourceInspectorPlugin::_confirm_change_id));
} }
edited_source = p_for_source; edited_source = p_for_source;
id_input->set_value(p_for_source->get("id")); id_input->set_value(p_for_source->get("id"));

View File

@ -1486,7 +1486,7 @@ ProjectManager::ProjectManager() {
ask_full_convert_dialog = memnew(ConfirmationDialog); ask_full_convert_dialog = memnew(ConfirmationDialog);
ask_full_convert_dialog->set_autowrap(true); ask_full_convert_dialog->set_autowrap(true);
ask_full_convert_dialog->set_text(TTR("This option will perform full project conversion, updating scenes, resources and scripts from Godot 3 to work in Godot 4.\n\nNote that this is a best-effort conversion, i.e. it makes upgrading the project easier, but it will not open out-of-the-box and will still require manual adjustments.\n\nIMPORTANT: Make sure to backup your project before converting, as this operation makes it impossible to open it in older versions of Godot.")); ask_full_convert_dialog->set_text(TTR("This option will perform full project conversion, updating scenes, resources and scripts from Godot 3 to work in Godot 4.\n\nNote that this is a best-effort conversion, i.e. it makes upgrading the project easier, but it will not open out-of-the-box and will still require manual adjustments.\n\nIMPORTANT: Make sure to backup your project before converting, as this operation makes it impossible to open it in older versions of Godot."));
ask_full_convert_dialog->connect("confirmed", callable_mp(this, &ProjectManager::_perform_full_project_conversion)); ask_full_convert_dialog->connect(SceneStringName(confirmed), callable_mp(this, &ProjectManager::_perform_full_project_conversion));
add_child(ask_full_convert_dialog); add_child(ask_full_convert_dialog);
project_dialog = memnew(ProjectDialog); project_dialog = memnew(ProjectDialog);

View File

@ -410,11 +410,11 @@ void PropertySelector::_hide_requested() {
void PropertySelector::_notification(int p_what) { void PropertySelector::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_ENTER_TREE: { case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &PropertySelector::_confirmed)); connect(SceneStringName(confirmed), callable_mp(this, &PropertySelector::_confirmed));
} break; } break;
case NOTIFICATION_EXIT_TREE: { case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &PropertySelector::_confirmed)); disconnect(SceneStringName(confirmed), callable_mp(this, &PropertySelector::_confirmed));
} break; } break;
} }
} }

View File

@ -38,11 +38,11 @@
void ReparentDialog::_notification(int p_what) { void ReparentDialog::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_ENTER_TREE: { case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &ReparentDialog::_reparent)); connect(SceneStringName(confirmed), callable_mp(this, &ReparentDialog::_reparent));
} break; } break;
case NOTIFICATION_EXIT_TREE: { case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &ReparentDialog::_reparent)); disconnect(SceneStringName(confirmed), callable_mp(this, &ReparentDialog::_reparent));
} break; } break;
} }
} }

View File

@ -72,7 +72,7 @@ void SceneCreateDialog::config(const String &p_dir) {
void SceneCreateDialog::accept_create() { void SceneCreateDialog::accept_create() {
if (!get_ok_button()->is_disabled()) { if (!get_ok_button()->is_disabled()) {
hide(); hide();
emit_signal(SNAME("confirmed")); emit_signal(SceneStringName(confirmed));
} }
} }

View File

@ -1597,12 +1597,12 @@ void SceneTreeDock::_notification(int p_what) {
} break; } break;
case NOTIFICATION_ENTER_TREE: { case NOTIFICATION_ENTER_TREE: {
clear_inherit_confirm->connect("confirmed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_SCENE_CLEAR_INHERITANCE_CONFIRM, false)); clear_inherit_confirm->connect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_SCENE_CLEAR_INHERITANCE_CONFIRM, false));
scene_tree->set_auto_expand_selected(EDITOR_GET("docks/scene_tree/auto_expand_to_selected"), false); scene_tree->set_auto_expand_selected(EDITOR_GET("docks/scene_tree/auto_expand_to_selected"), false);
} break; } break;
case NOTIFICATION_EXIT_TREE: { case NOTIFICATION_EXIT_TREE: {
clear_inherit_confirm->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_tool_selected)); clear_inherit_confirm->disconnect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDock::_tool_selected));
} break; } break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
@ -2453,13 +2453,13 @@ void SceneTreeDock::_shader_created(Ref<Shader> p_shader) {
void SceneTreeDock::_script_creation_closed() { void SceneTreeDock::_script_creation_closed() {
script_create_dialog->disconnect("script_created", callable_mp(this, &SceneTreeDock::_script_created)); script_create_dialog->disconnect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
script_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed)); script_create_dialog->disconnect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDock::_script_creation_closed));
script_create_dialog->disconnect("canceled", callable_mp(this, &SceneTreeDock::_script_creation_closed)); script_create_dialog->disconnect("canceled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
} }
void SceneTreeDock::_shader_creation_closed() { void SceneTreeDock::_shader_creation_closed() {
shader_create_dialog->disconnect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created)); shader_create_dialog->disconnect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created));
shader_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); shader_create_dialog->disconnect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDock::_shader_creation_closed));
shader_create_dialog->disconnect("canceled", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); shader_create_dialog->disconnect("canceled", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
} }
@ -3860,7 +3860,7 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) {
} }
script_create_dialog->connect("script_created", callable_mp(this, &SceneTreeDock::_script_created)); script_create_dialog->connect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
script_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed)); script_create_dialog->connect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDock::_script_creation_closed));
script_create_dialog->connect("canceled", callable_mp(this, &SceneTreeDock::_script_creation_closed)); script_create_dialog->connect("canceled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
script_create_dialog->set_inheritance_base_type("Node"); script_create_dialog->set_inheritance_base_type("Node");
script_create_dialog->config(inherits, path); script_create_dialog->config(inherits, path);
@ -3902,7 +3902,7 @@ void SceneTreeDock::attach_shader_to_selected(int p_preferred_mode) {
} }
shader_create_dialog->connect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created)); shader_create_dialog->connect("shader_created", callable_mp(this, &SceneTreeDock::_shader_created));
shader_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); shader_create_dialog->connect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDock::_shader_creation_closed));
shader_create_dialog->connect("canceled", callable_mp(this, &SceneTreeDock::_shader_creation_closed)); shader_create_dialog->connect("canceled", callable_mp(this, &SceneTreeDock::_shader_creation_closed));
shader_create_dialog->config(path, true, true, -1, p_preferred_mode); shader_create_dialog->config(path, true, true, -1, p_preferred_mode);
shader_create_dialog->popup_centered(); shader_create_dialog->popup_centered();
@ -4550,7 +4550,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
delete_dialog = memnew(ConfirmationDialog); delete_dialog = memnew(ConfirmationDialog);
add_child(delete_dialog); add_child(delete_dialog);
delete_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_delete_confirm).bind(false)); delete_dialog->connect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDock::_delete_confirm).bind(false));
VBoxContainer *vb = memnew(VBoxContainer); VBoxContainer *vb = memnew(VBoxContainer);
delete_dialog->add_child(vb); delete_dialog->add_child(vb);
@ -4564,11 +4564,11 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
editable_instance_remove_dialog = memnew(ConfirmationDialog); editable_instance_remove_dialog = memnew(ConfirmationDialog);
add_child(editable_instance_remove_dialog); add_child(editable_instance_remove_dialog);
editable_instance_remove_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_toggle_editable_children_from_selection)); editable_instance_remove_dialog->connect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDock::_toggle_editable_children_from_selection));
placeholder_editable_instance_remove_dialog = memnew(ConfirmationDialog); placeholder_editable_instance_remove_dialog = memnew(ConfirmationDialog);
add_child(placeholder_editable_instance_remove_dialog); add_child(placeholder_editable_instance_remove_dialog);
placeholder_editable_instance_remove_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_toggle_placeholder_from_selection)); placeholder_editable_instance_remove_dialog->connect(SceneStringName(confirmed), callable_mp(this, &SceneTreeDock::_toggle_placeholder_from_selection));
new_scene_from_dialog = memnew(EditorFileDialog); new_scene_from_dialog = memnew(EditorFileDialog);
new_scene_from_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE); new_scene_from_dialog->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);

View File

@ -190,7 +190,7 @@ void SurfaceUpgradeDialog::_notification(int p_what) {
switch (p_what) { switch (p_what) {
case NOTIFICATION_READY: case NOTIFICATION_READY:
// Can't do it in the constructor because it doesn't know that the signal exists. // Can't do it in the constructor because it doesn't know that the signal exists.
connect("confirmed", callable_mp(SurfaceUpgradeTool::get_singleton(), &SurfaceUpgradeTool::prepare_upgrade)); connect(SceneStringName(confirmed), callable_mp(SurfaceUpgradeTool::get_singleton(), &SurfaceUpgradeTool::prepare_upgrade));
break; break;
} }
} }

View File

@ -517,7 +517,7 @@ bool EditorFileSystemImportFormatSupportQueryBlend::query() {
configure_blender_dialog->set_ok_button_text(TTR("Confirm Path")); configure_blender_dialog->set_ok_button_text(TTR("Confirm Path"));
configure_blender_dialog->set_cancel_button_text(TTR("Disable '.blend' Import")); configure_blender_dialog->set_cancel_button_text(TTR("Disable '.blend' Import"));
configure_blender_dialog->get_cancel_button()->set_tooltip_text(TTR("Disables Blender '.blend' files import for this project. Can be re-enabled in Project Settings.")); configure_blender_dialog->get_cancel_button()->set_tooltip_text(TTR("Disables Blender '.blend' files import for this project. Can be re-enabled in Project Settings."));
configure_blender_dialog->connect("confirmed", callable_mp(this, &EditorFileSystemImportFormatSupportQueryBlend::_path_confirmed)); configure_blender_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorFileSystemImportFormatSupportQueryBlend::_path_confirmed));
browse_dialog = memnew(EditorFileDialog); browse_dialog = memnew(EditorFileDialog);
browse_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM); browse_dialog->set_access(EditorFileDialog::ACCESS_FILESYSTEM);

View File

@ -175,7 +175,7 @@ ReplicationEditor::ReplicationEditor() {
delete_dialog = memnew(ConfirmationDialog); delete_dialog = memnew(ConfirmationDialog);
delete_dialog->connect("canceled", callable_mp(this, &ReplicationEditor::_dialog_closed).bind(false)); delete_dialog->connect("canceled", callable_mp(this, &ReplicationEditor::_dialog_closed).bind(false));
delete_dialog->connect("confirmed", callable_mp(this, &ReplicationEditor::_dialog_closed).bind(true)); delete_dialog->connect(SceneStringName(confirmed), callable_mp(this, &ReplicationEditor::_dialog_closed).bind(true));
add_child(delete_dialog); add_child(delete_dialog);
VBoxContainer *vb = memnew(VBoxContainer); VBoxContainer *vb = memnew(VBoxContainer);

View File

@ -134,7 +134,7 @@ void AcceptDialog::_ok_pressed() {
set_visible(false); set_visible(false);
} }
ok_pressed(); ok_pressed();
emit_signal(SNAME("confirmed")); emit_signal(SceneStringName(confirmed));
set_input_as_handled(); set_input_as_handled();
} }

View File

@ -1486,7 +1486,7 @@ FileDialog::FileDialog() {
dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES); dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES);
_update_drives(); _update_drives();
connect("confirmed", callable_mp(this, &FileDialog::_action_pressed)); connect(SceneStringName(confirmed), callable_mp(this, &FileDialog::_action_pressed));
tree->connect("multi_selected", callable_mp(this, &FileDialog::_tree_multi_selected), CONNECT_DEFERRED); tree->connect("multi_selected", callable_mp(this, &FileDialog::_tree_multi_selected), CONNECT_DEFERRED);
tree->connect("cell_selected", callable_mp(this, &FileDialog::_tree_selected), CONNECT_DEFERRED); tree->connect("cell_selected", callable_mp(this, &FileDialog::_tree_selected), CONNECT_DEFERRED);
tree->connect("item_activated", callable_mp(this, &FileDialog::_tree_item_activated)); tree->connect("item_activated", callable_mp(this, &FileDialog::_tree_item_activated));
@ -1498,7 +1498,7 @@ FileDialog::FileDialog() {
confirm_save = memnew(ConfirmationDialog); confirm_save = memnew(ConfirmationDialog);
add_child(confirm_save, false, INTERNAL_MODE_FRONT); add_child(confirm_save, false, INTERNAL_MODE_FRONT);
confirm_save->connect("confirmed", callable_mp(this, &FileDialog::_save_confirm_pressed)); confirm_save->connect(SceneStringName(confirmed), callable_mp(this, &FileDialog::_save_confirm_pressed));
makedialog = memnew(ConfirmationDialog); makedialog = memnew(ConfirmationDialog);
makedialog->set_title(ETR("Create Folder")); makedialog->set_title(ETR("Create Folder"));
@ -1510,7 +1510,7 @@ FileDialog::FileDialog() {
makevb->add_margin_child(ETR("Name:"), makedirname); makevb->add_margin_child(ETR("Name:"), makedirname);
add_child(makedialog, false, INTERNAL_MODE_FRONT); add_child(makedialog, false, INTERNAL_MODE_FRONT);
makedialog->register_text_enter(makedirname); makedialog->register_text_enter(makedirname);
makedialog->connect("confirmed", callable_mp(this, &FileDialog::_make_dir_confirm)); makedialog->connect(SceneStringName(confirmed), callable_mp(this, &FileDialog::_make_dir_confirm));
mkdirerr = memnew(AcceptDialog); mkdirerr = memnew(AcceptDialog);
mkdirerr->set_text(ETR("Could not create folder.")); mkdirerr->set_text(ETR("Could not create folder."));
add_child(mkdirerr, false, INTERNAL_MODE_FRONT); add_child(mkdirerr, false, INTERNAL_MODE_FRONT);

View File

@ -136,4 +136,6 @@ SceneStringNames::SceneStringNames() {
panel = StaticCString::create("panel"); panel = StaticCString::create("panel");
item_selected = StaticCString::create("item_selected"); item_selected = StaticCString::create("item_selected");
confirmed = StaticCString::create("confirmed");
} }

View File

@ -149,6 +149,8 @@ public:
StringName panel; StringName panel;
StringName item_selected; StringName item_selected;
StringName confirmed;
}; };
#define SceneStringName(m_name) SceneStringNames::get_singleton()->m_name #define SceneStringName(m_name) SceneStringNames::get_singleton()->m_name