Make swap_cancel_ok setting 3-state instead of boolean.

This commit is contained in:
Pāvels Nadtočajevs 2025-04-03 11:09:37 +03:00
parent 1f56d96cf2
commit 2f8b96e8a2
No known key found for this signature in database
GPG key ID: 8413210218EF35D2
5 changed files with 20 additions and 9 deletions

View file

@ -1630,7 +1630,11 @@ ProjectManager::ProjectManager() {
ask_update_settings = memnew(ConfirmationDialog);
ask_update_settings->set_autowrap(true);
ask_update_settings->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_open_selected_projects_with_migration));
full_convert_button = ask_update_settings->add_button(TTR("Convert Full Project"), !GLOBAL_GET("gui/common/swap_cancel_ok"));
int ed_swap_cancel_ok = EDITOR_GET("interface/editor/accept_dialog_cancel_ok_buttons");
if (ed_swap_cancel_ok == 0) {
ed_swap_cancel_ok = DisplayServer::get_singleton()->get_swap_cancel_ok() ? 2 : 1;
}
full_convert_button = ask_update_settings->add_button(TTR("Convert Full Project"), ed_swap_cancel_ok != 2);
full_convert_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_full_convert_button_pressed));
add_child(ask_update_settings);