From 8cfb3d5d9cbc7d918a30054a56674f289edeb7b6 Mon Sep 17 00:00:00 2001 From: deveee Date: Wed, 13 Nov 2013 08:48:09 +0000 Subject: [PATCH] Very quick workaround for ticket #1081. Just inform a player that grand prix will be continued. Ideally player should choose if he want to start new GP or continue previously saved. String "Continue Grand Prix" was translated in previous versions of STK and launchpad should remember it (I hope). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14418 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- data/po/supertuxkart.pot | 8 ++++++-- src/states_screens/dialogs/gp_info_dialog.cpp | 14 +++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/data/po/supertuxkart.pot b/data/po/supertuxkart.pot index 5ddb09ded..59db9b39a 100644 --- a/data/po/supertuxkart.pot +++ b/data/po/supertuxkart.pot @@ -788,6 +788,10 @@ msgstr "" msgid "Continue" msgstr "" +#: src/states_screens/dialogs/gp_info_dialog.cpp:156 +msgid "Continue Grand Prix" +msgstr "" + #. I18N: ./data/gui/options_input.stkgui #. I18N: Section in the settings menu #. I18N: ./data/gui/options_device.stkgui @@ -1901,7 +1905,7 @@ msgstr "" msgid "Start Game" msgstr "" -#: src/states_screens/dialogs/gp_info_dialog.cpp:146 +#: src/states_screens/dialogs/gp_info_dialog.cpp:158 msgid "Start Grand Prix" msgstr "" @@ -2039,7 +2043,7 @@ msgid "" "all highscores have been erased." msgstr "" -#: src/states_screens/dialogs/gp_info_dialog.cpp:151 +#: src/states_screens/dialogs/gp_info_dialog.cpp:163 msgid "This Grand Prix is broken!" msgstr "" diff --git a/src/states_screens/dialogs/gp_info_dialog.cpp b/src/states_screens/dialogs/gp_info_dialog.cpp index 395bc5ee5..da211e4b2 100644 --- a/src/states_screens/dialogs/gp_info_dialog.cpp +++ b/src/states_screens/dialogs/gp_info_dialog.cpp @@ -19,6 +19,7 @@ #include "audio/sfx_manager.hpp" #include "challenges/unlock_manager.hpp" +#include "config/saved_grand_prix.hpp" #include "guiengine/engine.hpp" #include "guiengine/screen.hpp" #include "guiengine/widgets/button_widget.hpp" @@ -140,10 +141,21 @@ GPInfoDialog::GPInfoDialog(const std::string& gpIdent, const float w, const floa // ---- Start button ButtonWidget* okBtn = new ButtonWidget(); + SavedGrandPrix* saved_gp = SavedGrandPrix::getSavedGP( StateManager::get() + ->getActivePlayerProfile(0) + ->getUniqueID(), + gpIdent, + race_manager->getDifficulty(), + race_manager->getNumberOfKarts(), + race_manager->getNumLocalPlayers()); + if (gp_ok) { okBtn->m_properties[PROP_ID] = "start"; - okBtn->setText(_("Start Grand Prix")); + if (saved_gp) + okBtn->setText(_("Continue Grand Prix")); + else + okBtn->setText(_("Start Grand Prix")); } else {