From 80e61e0ca0aacb3fc7cd100a7ccf4b34d9150d18 Mon Sep 17 00:00:00 2001 From: konstin Date: Wed, 23 Jul 2014 10:01:29 +0200 Subject: [PATCH 001/248] Adding save Button for random GP --- src/states_screens/grand_prix_lose.cpp | 23 ++++++++++++++++++++++- src/states_screens/grand_prix_win.cpp | 21 +++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/states_screens/grand_prix_lose.cpp b/src/states_screens/grand_prix_lose.cpp index f9bc459fd..5e604de8b 100644 --- a/src/states_screens/grand_prix_lose.cpp +++ b/src/states_screens/grand_prix_lose.cpp @@ -26,6 +26,7 @@ #include "graphics/irr_driver.hpp" #include "guiengine/engine.hpp" #include "guiengine/scalable_font.hpp" +#include "guiengine/widgets/button_widget.hpp" #include "guiengine/widgets/label_widget.hpp" #include "io/file_manager.hpp" #include "items/item_manager.hpp" @@ -142,6 +143,23 @@ void GrandPrixLose::init() World::getWorld()->setPhase(WorldStatus::RACE_PHASE); + if (race_manager->getGrandPrix().getId() == "random") + { + core::stringw text = _("Save Grand Prix"); + + typedef GUIEngine::ButtonWidget Button; + Button* save_button = new Button(); + save_button->m_properties[GUIEngine::PROP_ID] = "save gp"; + Button* c = getWidget