git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4585 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 6d3d23c29fd7876cee275c64c835235024ff8d5b Former-commit-id: 7c1597e9eb52ee45811d58917d2a5510ab3665b9
This commit is contained in:
parent
85d664d980
commit
b3b058aeee
1 changed files with 6 additions and 4 deletions
|
@ -118,9 +118,10 @@ RmPitMenuStart(tCarElt *car, tSituation *s, tfuiCallback callback)
|
|||
GfuiLabelSetText(menuHandle, titleId, buf);
|
||||
|
||||
// Create labels for remaining laps and remaining fuel.
|
||||
int remainLapsId = GfuiMenuCreateLabelControl(menuHandle, menuXMLDescHdle, "remaininglapslabel");
|
||||
if( s->_totTime > 0 && s->_totTime > s->currentTime ) /* Timed part of the timed session */
|
||||
int remainLapsTimeId = GfuiMenuCreateLabelControl(menuHandle, menuXMLDescHdle, "remaininglapstimelabel");
|
||||
if( s->_totTime > 0 && s->_totTime > s->currentTime ) // Timed part of the timed session
|
||||
{
|
||||
GfuiMenuCreateLabelControl(menuHandle, menuXMLDescHdle, "remainingtimelabel");
|
||||
if( s->_extraLaps > 0)
|
||||
snprintf(buf, sizeof(buf), "%s + %d laps", GfTime2Str( s->_totTime - s->currentTime, NULL, true, 0 ), s->_extraLaps);
|
||||
else
|
||||
|
@ -128,9 +129,10 @@ RmPitMenuStart(tCarElt *car, tSituation *s, tfuiCallback callback)
|
|||
}
|
||||
else
|
||||
{
|
||||
GfuiMenuCreateLabelControl(menuHandle, menuXMLDescHdle, "remaininglapslabel");
|
||||
snprintf(buf, sizeof(buf), "%d", car->_remainingLaps); //Laps tot drive to win the race
|
||||
}
|
||||
GfuiLabelSetText(menuHandle, remainLapsId, buf);
|
||||
GfuiLabelSetText(menuHandle, remainLapsTimeId, buf);
|
||||
|
||||
int remainFuelId = GfuiMenuCreateLabelControl(menuHandle, menuXMLDescHdle, "remainingfuellabel");
|
||||
snprintf(buf, sizeof(buf), "%.1f", car->_fuel);
|
||||
|
|
Loading…
Reference in a new issue