1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Merge pull request #90660 from adamscott/rename-file-updated-dialog

Improve UX when saving newer files on disk
This commit is contained in:
Rémi Verschelde
2024-05-29 11:19:41 +02:00
2 changed files with 15 additions and 7 deletions

View File

@@ -7228,6 +7228,8 @@ EditorNode::EditorNode() {
disk_changed = memnew(ConfirmationDialog);
{
disk_changed->set_title(TTR("Files have been modified on disk"));
VBoxContainer *vbc = memnew(VBoxContainer);
disk_changed->add_child(vbc);
@@ -7241,9 +7243,9 @@ EditorNode::EditorNode() {
disk_changed->connect("confirmed", callable_mp(this, &EditorNode::_reload_modified_scenes));
disk_changed->connect("confirmed", callable_mp(this, &EditorNode::_reload_project_settings));
disk_changed->set_ok_button_text(TTR("Reload"));
disk_changed->set_ok_button_text(TTR("Discard local changes and reload"));
disk_changed->add_button(TTR("Resave"), !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");
disk_changed->connect("custom_action", callable_mp(this, &EditorNode::_resave_scenes));
}