Added GrandPrixData::isRandomGP.
This commit is contained in:
parent
ae01eaf595
commit
0a0609d91f
@ -135,6 +135,9 @@ public:
|
|||||||
/** @return the internal indentifier of the Grand Prix (not translated) */
|
/** @return the internal indentifier of the Grand Prix (not translated) */
|
||||||
const std::string& getId() const { return m_id; }
|
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. */
|
/** Returns the filename of the grand prix xml file. */
|
||||||
const std::string& getFilename() const { return m_filename; }
|
const std::string& getFilename() const { return m_filename; }
|
||||||
|
@ -125,7 +125,7 @@ void BaseGPInfoScreen::init()
|
|||||||
Screen::init();
|
Screen::init();
|
||||||
m_curr_time = 0.0f;
|
m_curr_time = 0.0f;
|
||||||
|
|
||||||
bool random = m_gp.getId()=="random";
|
bool random = m_gp.isRandomGP();
|
||||||
|
|
||||||
SpinnerWidget *reverse_spinner = getWidget<SpinnerWidget>("reverse-spinner");
|
SpinnerWidget *reverse_spinner = getWidget<SpinnerWidget>("reverse-spinner");
|
||||||
getWidget<LabelWidget >("track-text" )->setVisible(random);
|
getWidget<LabelWidget >("track-text" )->setVisible(random);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user