Fixed setting of actual number of laps of a track; cleaned up docs.

This commit is contained in:
hiker 2014-08-26 16:37:06 +10:00
parent c9fb0c5b16
commit b029c3e990
2 changed files with 5 additions and 17 deletions

View File

@ -71,7 +71,7 @@ void TrackInfoScreen::loadedFromFile()
} // loadedFromFile
// ----------------------------------------------------------------------------
void TrackInfoScreen::setTrack(const Track *track)
void TrackInfoScreen::setTrack(Track *track)
{
m_track = track;
} // setTrack
@ -107,7 +107,6 @@ void TrackInfoScreen::init()
// temporary icon, will replace it just after (but it will be shown if the given icon is not found)
screenshot_widget->m_properties[PROP_ICON] = "gui/main_help.png";
//FIXME screenshot_widget->setParent(m_irrlicht_window);
screenshot_widget->add();
ITexture* screenshot = irr_driver->getTexture(m_track->getScreenshotFile(),
@ -268,7 +267,7 @@ void TrackInfoScreen::onEnterPressedInternal()
: -1;
const bool reverse_track = m_reverse == NULL ? false
: m_reverse->getState();
//FIXME m_track->setActualNumberOfLaps(num_laps);
m_track->setActualNumberOfLaps(num_laps);
race_manager->setReverseTrack(reverse_track);
// Disable accidentally unlocking of a challenge

View File

@ -22,9 +22,6 @@
#include "guiengine/screen.hpp"
//#include "guiengine/widgets/check_box_widget.hpp"
namespace GUIEngine
{
class CheckBoxWidget;
@ -40,12 +37,12 @@ class Track;
* \ingroup states_screens
*/
class TrackInfoScreen : public GUIEngine::Screen,
public GUIEngine::ScreenSingleton<TrackInfoScreen>
public GUIEngine::ScreenSingleton<TrackInfoScreen>
{
static const int HIGHSCORE_COUNT = 3;
/** A pointer to the track of which the info is shown. */
const Track *m_track;
Track *m_track;
// When there is no need to tab through / click on images/labels, we can add directly
// irrlicht labels (more complicated uses require the use of our widget set)
@ -67,14 +64,6 @@ class TrackInfoScreen : public GUIEngine::Screen,
void updateHighScores();
public:
/**
* \brief Creates a track info modal dialog with given percentage of screen width and height
* \param ribbonItem identifier name of the ribbon item that was clicked in the track selection
* screen to get there (often will be 'trackIdent' but may also be the random item)
* \param trackIdent identifier name of the track to show information about
* \param trackName human-readable, possibly translated, name of the track to show information about
* \param screenshot screenshot of the track to show information about
*/
TrackInfoScreen();
virtual ~TrackInfoScreen();
@ -83,7 +72,7 @@ public:
virtual void eventCallback(GUIEngine::Widget *,const std::string &name ,
const int player_id);
void onEnterPressedInternal();
void setTrack(const Track *track);
void setTrack(Track *track);
};
#endif