Convert another editor confirmation dialog to GUI2

This commit is contained in:
Ignacio R. Morelle 2010-11-05 22:37:34 +00:00
parent 779e207ed7
commit 4cf1251cf4

View file

@ -474,9 +474,8 @@ void editor_controller::save_map_as_dialog()
res = dialogs::show_file_chooser_dialog_save(gui(), input_name, _("Save the Map As"));
if (res == 0) {
if (file_exists(input_name)) {
overwrite_res = gui::dialog(gui(), "",
_("The file already exists. Do you want to overwrite it?"),
gui::YES_NO).show();
const int res = gui2::show_message(gui().video(), "", _("The file already exists. Do you want to overwrite it?"), gui2::tmessage::yes_no_buttons);
overwrite_res = gui2::twindow::CANCEL == res ? 1 : 0;
} else {
overwrite_res = 0;
}