Added GrandPrixData::isRandomGP.

This commit is contained in:
hiker 2014-09-03 08:24:11 +10:00
parent ae01eaf595
commit 0a0609d91f
2 changed files with 4 additions and 1 deletions

View File

@ -135,6 +135,9 @@ public:
/** @return the internal indentifier of the Grand Prix (not translated) */
const std::string& getId() const { return m_id; }
// ------------------------------------------------------------------------
/** Returns true if this GP is a random GP. */
bool isRandomGP() const { return m_id=="random"; }
// ------------------------------------------------------------------------
/** Returns the filename of the grand prix xml file. */
const std::string& getFilename() const { return m_filename; }

View File

@ -125,7 +125,7 @@ void BaseGPInfoScreen::init()
Screen::init();
m_curr_time = 0.0f;
bool random = m_gp.getId()=="random";
bool random = m_gp.isRandomGP();
SpinnerWidget *reverse_spinner = getWidget<SpinnerWidget>("reverse-spinner");
getWidget<LabelWidget >("track-text" )->setVisible(random);