41 static float red[4] = {1.0, 0.0, 0.0, 1.0};
117 const int BUFSIZE = 1024;
122 GfOut(
"End of configuration\n");
127 snprintf(path, BUFSIZE,
"%s/%d",
RM_SECT_CONF, curConf);
134 GfOut(
"Configuration step %s\n", conf);
171 for (i = 1; i < numOpt + 1; i++) {
211 const int BUFSIZE = 1024;
214 snprintf(buf, BUFSIZE,
"%sresults/%s/%s",
GetLocalDir(),
ReInfo->_reFilename, filename);
215 GfOut(
"Loading Saved File %s...\n", buf);
272 "New Race",
"Start a New Race",
276 "Configure Race",
"Configure The Race",
285 "Load",
"Load a Previously Saved Game",
290 "Back to Main",
"Return to previous Menu",
309 const int BUFSIZE = 1024;
331 snprintf(buf, BUFSIZE,
"Race Day #%d/%d on %s",
344 "Start Event",
"Start The Current Race",
349 "Abandon",
"Abandon The Race",
void * GfParmReadFile(const char *file, int mode)
Read parameter set from file and return handle to parameter set.
char * path
Directory containing the files to list.
int GfuiMenuButtonCreate(void *scr, const char *text, const char *tip, void *userdata, tfuiCallback onpush)
Add a button to a menu screen.
#define GFPARM_RMODE_STD
if handle already openned return it
#define RM_VAL_CONFDISPMODE
const char * title
Title for race parameters (for screen title)
void * results
Race results.
void GfuiAddKey(void *scr, unsigned char key, const char *descr, void *userData, tfuiCallback onKeyPressed, tfuiCallback onKeyReleased)
Add a Keyboard callback to a screen.
void * nextScreen
Race manager screen to go after select.
void GfuiScreenRelease(void *scr)
Release the given screen.
void * prevScreen
Race manager screen to go back.
void * param
Pointer to race manager parameter set (to set the track)
void GfuiScreenAddBgImg(void *scr, const char *filename)
Add an image background to a screen.
tTrackItf trackItf
Track module interface.
int GfParmWriteFile(const char *file, void *parmHandle, const char *name)
Write parameter set into file.
const char * title
Title for file selection (for screen title)
void * prevScreen
Link to previous screen.
const char * GfParmGetStr(void *parmHandle, const char *path, const char *key, const char *deflt)
Get a string parameter from the parameter set handle.
The Gaming Framework API (client part).
void ReStartNewRace(void *)
Structure for file selection.
void * GfuiScreenCreateEx(float *bgColor, void *userDataOnActivate, tfuiCallback onActivate, void *userDataOnDeactivate, tfuiCallback onDeactivate, int mouseAllowed)
Create a screen.
#define RM_CONF_DISP_MODE
void * nextScreen
Race manager screen to go after select.
const char * name
Name of the track.
tTrack * track
Current track.
void GfuiMenuDefaultKeysAdd(void *scr)
Add the default menu keyboard callback to a screen.
unsigned int confMask
Tell what to configure.
void * GfuiHookCreate(void *userDataOnActivate, tfuiCallback onActivate)
Create a callback hook.
void(* tfuiCallback)(void *)
This is the race information structures.
void GfuiScreenActivate(void *screen)
Activate a screen and make it current.
void * prevScreen
Race manager screen to go back.
int GfParmSetNum(void *handle, const char *path, const char *key, const char *unit, tdble val)
Set a numerical parameter in the parameter set handle.
Structure for track selection.
#define RM_VAL_CONFRACELEN
tdble GfParmGetNum(void *handle, const char *path, const char *key, const char *unit, tdble deflt)
Get a numerical parameter from the parameter set handle.
tfSelectFile select
Callback function to handle the selection (store the selection in the caller)
int GfuiLabelCreateEx(void *scr, const char *text, float *fgColor, int font, int x, int y, int align, int maxlen)
Create a new label (extended version).
int GfuiTitleCreate(void *scr, const char *text, int maxlen)
Add a Title to the screen.
void * param
Pointer to race manager parameter set (to set the driver)
Structure for configuring parameters.
#define GFUI_FONT_MEDIUM_C
int GfParmGetEltNb(void *handle, const char *path)
Count the number of subsections in a section in the parameter set handle.
void * prevScreen
Race manager screen to go back.
void * nextScreen
Race manager screen to go after select.
void * param
Pointer to race manager parameter set (to set the parameters)
#define RE_ATTR_CUR_TRACK
Structure for driver selection.
int GfuiMenuBackQuitButtonCreate(void *scr, const char *text, const char *tip, void *userdata, tfuiCallback onpush)
Add the "Back" or "Quit" button at the bottom of the menu screen.
void * params
Raceman parameters.
#define GFPARM_RMODE_CREAT
Create the file if doesn't exist.