Clarify UI in game paused dialog of story mode, fixes #3004

This commit is contained in:
auria.mg 2017-11-01 19:28:22 -04:00
parent 3760d84359
commit 04c9763e77
2 changed files with 13 additions and 0 deletions

View File

@ -178,4 +178,15 @@ GUIEngine::EventPropagation
// ----------------------------------------------------------------------------
void RacePausedDialog::beforeAddingWidgets()
{
GUIEngine::RibbonWidget* choice_ribbon =
getWidget<GUIEngine::RibbonWidget>("choiceribbon");
bool showSetupNewRace = race_manager->raceWasStartedFromOverworld();
int index = choice_ribbon->findItemNamed("newrace");
if (index != -1)
choice_ribbon->setItemVisible(index, !showSetupNewRace);
}
// ----------------------------------------------------------------------------

View File

@ -19,6 +19,7 @@
#define HEADER_RACE_PAUSED_DIALOG_HPP
#include "guiengine/modaldialog.hpp"
#include "utils/cpp2011.hpp"
namespace GUIEngine
{
@ -45,6 +46,7 @@ public:
void onEnterPressedInternal();
GUIEngine::EventPropagation processEvent(const std::string& eventSource);
virtual void beforeAddingWidgets() OVERRIDE;
};
#endif