TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
pitmenu.cpp File Reference


Pit menu More...

#include <stdlib.h>
#include <tgfclient.h>
#include <car.h>
#include <portability.h>
#include <racescreens.h>
Include dependency graph for pitmenu.cpp:

Go to the source code of this file.

Functions

static void rmClampPitFuel (void)
static void rmClampPitRepair (void)
static void rmClampPitCmd (void)
static void rmSetFuelText (void)
static void rmSetRepairText (void)
static void rmUpdtFuel (void)
static void rmUpdtRepair (void)
static void rmHideButtonTips (void)
static void rmShowButtonTip (int buttonId, int tipLabelId, int disabledTipLabelId, bool available)
static void rmServiceFocus (void)
static void rmStopAndGoFocus (void)
static void rmSetupFocus (void)
static void rmStopAndGo (void)
static void rmService (void)
static void changeTireState (int i)
void RmPitMenuStartAction (tCarElt *car, tRmInfo *reInfo, const tGfuiAction &callback)
 Pit menu.
void RmPitMenuStart (tCarElt *car, tRmInfo *reInfo, void *userdata, tfuiCallback callback)

Variables

static void * menuHandle = NULL
static int fuelId
static int repairId
static tCarElt * rmCar
static tRmInfo * rmInfo
static int tireChangeId
static int serviceButtonId = -1
static int stopAndGoButtonId = -1
static int setupButtonId = -1
static int serviceTipLabelId = -1
static int stopAndGoTipLabelId = -1
static int stopAndGoDisabledTipLabelId = -1
static int setupTipLabelId = -1
static int setupDisabledTipLabelId = -1
static bool stopAndGoAvailable = false
static bool setupAvailable = false
static float LabelColor [] = {1.0, 0.0, 1.0, 1.0}
static float DisabledTipColor [] = {1.0, 0.0, 0.0, 1.0}
static const char * ServiceTipMessage = "Perform selected pit service"
static const char * StopAndGoTipMessage = "Serve current Stop & Go penalty"
static const char * NoStopAndGoMessage = "No current Stop & Go penalty to serve"
static const char * SetupTipMessage = "Change car setup"
static const char * SetupDisabledMessage = "Only available in practice and qualifying sessions"
static const char * tireChangeLabel []
static const tCarPitCmd::TireChange tireChangeList []
static const int nbtireChangeOptions = sizeof(tireChangeLabel) / sizeof(tireChangeLabel[0])
static int currentTireChangeOption = 0
static tGfuiAction rmCallback

Detailed Description


Pit menu

Author
Bernhard Wymann, Eric Espie

Definition in file pitmenu.cpp.

Function Documentation

◆ changeTireState()

void changeTireState ( int i)
static

Definition at line 229 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmClampPitCmd()

void rmClampPitCmd ( void )
static

Definition at line 107 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmClampPitFuel()

void rmClampPitFuel ( void )
static

Definition at line 71 of file pitmenu.cpp.

◆ rmClampPitRepair()

void rmClampPitRepair ( void )
static

Definition at line 89 of file pitmenu.cpp.

◆ rmHideButtonTips()

void rmHideButtonTips ( void )
static

Definition at line 155 of file pitmenu.cpp.

Here is the call graph for this function:

◆ RmPitMenuStart()

void RmPitMenuStart ( tCarElt * car,
tRmInfo * reInfo,
void * userdata,
tfuiCallback callback )

Definition at line 377 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmService()

void rmService ( void )
static

Definition at line 219 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmServiceFocus()

void rmServiceFocus ( void )
static

Definition at line 189 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmSetFuelText()

void rmSetFuelText ( void )
static

Definition at line 114 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmSetRepairText()

void rmSetRepairText ( void )
static

Definition at line 124 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmSetupFocus()

void rmSetupFocus ( void )
static

Definition at line 201 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmShowButtonTip()

void rmShowButtonTip ( int buttonId,
int tipLabelId,
int disabledTipLabelId,
bool available )
static

Definition at line 175 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmStopAndGo()

void rmStopAndGo ( void )
static

Definition at line 210 of file pitmenu.cpp.

◆ rmStopAndGoFocus()

void rmStopAndGoFocus ( void )
static

Definition at line 195 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmUpdtFuel()

void rmUpdtFuel ( void )
static

Definition at line 133 of file pitmenu.cpp.

Here is the call graph for this function:

◆ rmUpdtRepair()

void rmUpdtRepair ( void )
static

Definition at line 144 of file pitmenu.cpp.

Here is the call graph for this function:

Variable Documentation

◆ currentTireChangeOption

int currentTireChangeOption = 0
static

Definition at line 68 of file pitmenu.cpp.

◆ DisabledTipColor

float DisabledTipColor[] = {1.0, 0.0, 0.0, 1.0}
static

Definition at line 51 of file pitmenu.cpp.

◆ fuelId

int fuelId
static

Definition at line 34 of file pitmenu.cpp.

◆ LabelColor

float LabelColor[] = {1.0, 0.0, 1.0, 1.0}
static

Definition at line 50 of file pitmenu.cpp.

◆ menuHandle

void* menuHandle = NULL
static

Definition at line 33 of file pitmenu.cpp.

◆ nbtireChangeOptions

const int nbtireChangeOptions = sizeof(tireChangeLabel) / sizeof(tireChangeLabel[0])
static

Definition at line 67 of file pitmenu.cpp.

◆ NoStopAndGoMessage

const char* NoStopAndGoMessage = "No current Stop & Go penalty to serve"
static

Definition at line 54 of file pitmenu.cpp.

◆ repairId

int repairId
static

Definition at line 35 of file pitmenu.cpp.

◆ rmCallback

tGfuiAction rmCallback
static

Definition at line 207 of file pitmenu.cpp.

◆ rmCar

tCarElt* rmCar
static

Definition at line 36 of file pitmenu.cpp.

◆ rmInfo

tRmInfo* rmInfo
static

Definition at line 37 of file pitmenu.cpp.

◆ serviceButtonId

int serviceButtonId = -1
static

Definition at line 39 of file pitmenu.cpp.

◆ serviceTipLabelId

int serviceTipLabelId = -1
static

Definition at line 42 of file pitmenu.cpp.

◆ ServiceTipMessage

const char* ServiceTipMessage = "Perform selected pit service"
static

Definition at line 52 of file pitmenu.cpp.

◆ setupAvailable

bool setupAvailable = false
static

Definition at line 48 of file pitmenu.cpp.

◆ setupButtonId

int setupButtonId = -1
static

Definition at line 41 of file pitmenu.cpp.

◆ SetupDisabledMessage

const char* SetupDisabledMessage = "Only available in practice and qualifying sessions"
static

Definition at line 56 of file pitmenu.cpp.

◆ setupDisabledTipLabelId

int setupDisabledTipLabelId = -1
static

Definition at line 46 of file pitmenu.cpp.

◆ setupTipLabelId

int setupTipLabelId = -1
static

Definition at line 45 of file pitmenu.cpp.

◆ SetupTipMessage

const char* SetupTipMessage = "Change car setup"
static

Definition at line 55 of file pitmenu.cpp.

◆ stopAndGoAvailable

bool stopAndGoAvailable = false
static

Definition at line 47 of file pitmenu.cpp.

◆ stopAndGoButtonId

int stopAndGoButtonId = -1
static

Definition at line 40 of file pitmenu.cpp.

◆ stopAndGoDisabledTipLabelId

int stopAndGoDisabledTipLabelId = -1
static

Definition at line 44 of file pitmenu.cpp.

◆ stopAndGoTipLabelId

int stopAndGoTipLabelId = -1
static

Definition at line 43 of file pitmenu.cpp.

◆ StopAndGoTipMessage

const char* StopAndGoTipMessage = "Serve current Stop & Go penalty"
static

Definition at line 53 of file pitmenu.cpp.

◆ tireChangeId

int tireChangeId
static

Definition at line 38 of file pitmenu.cpp.

◆ tireChangeLabel

const char* tireChangeLabel[]
static
Initial value:
= {
"All",
"None"
}

Definition at line 59 of file pitmenu.cpp.

◆ tireChangeList

const tCarPitCmd::TireChange tireChangeList[]
static
Initial value:

Definition at line 63 of file pitmenu.cpp.