TORCS  1.3.9
The Open Racing Car Simulator
optionmenu.cpp
Go to the documentation of this file.
1 /***************************************************************************
2 
3  file : optionmenu.cpp
4  created : Mon Apr 24 14:22:53 CEST 2000
5  copyright : (C) 2000, 2001 by Eric Espie
6  email : torcs@free.fr
7  version : $Id$
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
20 #include <stdio.h>
21 #include <tgfclient.h>
22 #include "optionmenu.h"
23 #include <graphconfig.h>
24 #include <simuconfig.h>
25 #include <soundconfig.h>
26 #include <openglconfig.h>
27 
28 static void *optionHandle = NULL;
29 
30 void *
31 TorcsOptionOptionInit(void *precMenu)
32 {
33  if (optionHandle) return optionHandle;
34 
36 
37  GfuiScreenAddBgImg(optionHandle, "data/img/splash-options.png");
38 
40  "Graphic", "Configure graphic parameters",
42 
44  "Display", "Configure display parameters",
46 
47 /*
48  GfuiMenuButtonCreate(optionHandle,
49  "Simulation", "Configure simulation parameters",
50  SimuMenuInit(optionHandle), GfuiScreenActivate);
51 */
52 
54  "Sound", "Configure sound parameters",
56 
58  "OpenGL", "Configure OpenGL parameters",
60 
62  "Back",
63  "Back to Main",
64  precMenu,
66 
67  return optionHandle;
68 }
void * GfScrMenuInit(void *precMenu)
Create and activate the video options menu screen.
Definition: screen.cpp:767
int GfuiMenuButtonCreate(void *scr, const char *text, const char *tip, void *userdata, tfuiCallback onpush)
Add a button to a menu screen.
Definition: guimenu.cpp:110
void * GfuiMenuScreenCreate(const char *title)
Create a new menu screen.
Definition: guimenu.cpp:76
void GfuiScreenAddBgImg(void *scr, const char *filename)
Add an image background to a screen.
Definition: gui.cpp:961
void * GraphMenuInit(void *prevMenu)
static void * optionHandle
Definition: optionmenu.cpp:28
The Gaming Framework API (client part).
void * SoundMenuInit(void *prevMenu)
void GfuiScreenActivate(void *screen)
Activate a screen and make it current.
Definition: gui.cpp:467
void * OpenGLMenuInit(void *prevMenu)
void * TorcsOptionOptionInit(void *precMenu)
Definition: optionmenu.cpp:31
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.
Definition: guimenu.cpp:156