diff --git a/apps/openmw/mwgui/confirmationdialog.cpp b/apps/openmw/mwgui/confirmationdialog.cpp
index e4312914f..33f8dbe3e 100644
--- a/apps/openmw/mwgui/confirmationdialog.cpp
+++ b/apps/openmw/mwgui/confirmationdialog.cpp
@@ -17,19 +17,26 @@ namespace MWGui
}
void ConfirmationDialog::askForConfirmation(const std::string& message, const std::string& confirmMessage, const std::string& cancelMessage)
+ {
+ mCancelButton->setCaptionWithReplacing(cancelMessage);
+ mOkButton->setCaptionWithReplacing(confirmMessage);
+
+ askForConfirmation(message);
+ }
+
+ void ConfirmationDialog::askForConfirmation(const std::string& message)
{
setVisible(true);
mMessage->setCaptionWithReplacing(message);
- mCancelButton->setCaptionWithReplacing(cancelMessage);
- mOkButton->setCaptionWithReplacing(confirmMessage);
+ int height = mMessage->getTextSize().height + 60;
- int height = mMessage->getTextSize().height + 72;
+ int width = mMessage->getTextSize().width + 24;
- mMainWidget->setSize(mMainWidget->getWidth(), height);
+ mMainWidget->setSize(width, height);
- mMessage->setSize(mMessage->getWidth(), mMessage->getTextSize().height+24);
+ mMessage->setSize(mMessage->getWidth(), mMessage->getTextSize().height + 24);
center();
}
diff --git a/apps/openmw/mwgui/confirmationdialog.hpp b/apps/openmw/mwgui/confirmationdialog.hpp
index 14caa7748..745c7a1a5 100644
--- a/apps/openmw/mwgui/confirmationdialog.hpp
+++ b/apps/openmw/mwgui/confirmationdialog.hpp
@@ -9,7 +9,8 @@ namespace MWGui
{
public:
ConfirmationDialog();
- void askForConfirmation(const std::string& message, const std::string& confirmMessage="#{sOk}", const std::string& cancelMessage="#{sCancel}");
+ void askForConfirmation(const std::string& message);
+ void askForConfirmation(const std::string& message, const std::string& confirmMessage, const std::string& cancelMessage);
virtual void exit();
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
diff --git a/apps/openmw/mwgui/savegamedialog.cpp b/apps/openmw/mwgui/savegamedialog.cpp
index f93d1cc0a..cbc95e808 100644
--- a/apps/openmw/mwgui/savegamedialog.cpp
+++ b/apps/openmw/mwgui/savegamedialog.cpp
@@ -253,6 +253,21 @@ namespace MWGui
return;
}
}
+ else
+ {
+ MWBase::StateManager::State state = MWBase::Environment::get().getStateManager()->getState();
+
+ // If game is running, ask for confirmation first
+ if (state == MWBase::StateManager::State_Running && !reallySure)
+ {
+ ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
+ dialog->askForConfirmation("#{sMessage1}");
+ dialog->eventOkClicked.clear();
+ dialog->eventOkClicked += MyGUI::newDelegate(this, &SaveGameDialog::onConfirmationGiven);
+ dialog->eventCancelClicked.clear();
+ return;
+ }
+ }
setVisible(false);
MWBase::Environment::get().getWindowManager()->removeGuiMode (MWGui::GM_MainMenu);
diff --git a/files/mygui/openmw_button.skin.xml b/files/mygui/openmw_button.skin.xml
index 09a4c0e39..5aee8de7a 100644
--- a/files/mygui/openmw_button.skin.xml
+++ b/files/mygui/openmw_button.skin.xml
@@ -111,7 +111,7 @@
-
+
diff --git a/files/mygui/openmw_confirmation_dialog.layout b/files/mygui/openmw_confirmation_dialog.layout
index fbf779cd1..39e77cb93 100644
--- a/files/mygui/openmw_confirmation_dialog.layout
+++ b/files/mygui/openmw_confirmation_dialog.layout
@@ -1,10 +1,10 @@
-
+
-
+
@@ -12,14 +12,14 @@
-
+
-
+
-
+
diff --git a/files/mygui/openmw_count_window.layout b/files/mygui/openmw_count_window.layout
index 891f9f00c..a3234c405 100644
--- a/files/mygui/openmw_count_window.layout
+++ b/files/mygui/openmw_count_window.layout
@@ -1,29 +1,26 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
-
-
-
-
+
+
-
+
diff --git a/files/mygui/openmw_list.skin.xml b/files/mygui/openmw_list.skin.xml
index 9f5b2e94d..111d3bf30 100644
--- a/files/mygui/openmw_list.skin.xml
+++ b/files/mygui/openmw_list.skin.xml
@@ -131,9 +131,9 @@
-
+
-
+
diff --git a/files/mygui/openmw_savegame_dialog.layout b/files/mygui/openmw_savegame_dialog.layout
index ca11b65f8..f18218430 100644
--- a/files/mygui/openmw_savegame_dialog.layout
+++ b/files/mygui/openmw_savegame_dialog.layout
@@ -1,7 +1,7 @@
-
+
diff --git a/files/mygui/openmw_windows.skin.xml b/files/mygui/openmw_windows.skin.xml
index 423de14aa..00e6f9148 100644
--- a/files/mygui/openmw_windows.skin.xml
+++ b/files/mygui/openmw_windows.skin.xml
@@ -1,7 +1,7 @@
-
+
@@ -9,6 +9,14 @@
+
+
+
+
+
+
+
+
@@ -883,4 +891,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+