Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

ui_video.c File Reference

#include "ui_local.h"

Include dependency graph for ui_video.c:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  driverinfo_t
struct  graphicsoptions_t
struct  InitialVideoOptions_s

Defines

#define DRIVERINFO_BACK0   "menu/art/back_0"
#define DRIVERINFO_BACK1   "menu/art/back_1"
#define DRIVERINFO_FRAMEL   "menu/art/frame2_l"
#define DRIVERINFO_FRAMER   "menu/art/frame1_r"
#define GRAPHICSOPTIONS_ACCEPT0   "menu/art/accept_0"
#define GRAPHICSOPTIONS_ACCEPT1   "menu/art/accept_1"
#define GRAPHICSOPTIONS_BACK0   "menu/art/back_0"
#define GRAPHICSOPTIONS_BACK1   "menu/art/back_1"
#define GRAPHICSOPTIONS_FRAMEL   "menu/art/frame2_l"
#define GRAPHICSOPTIONS_FRAMER   "menu/art/frame1_r"
#define ID_BACK2   101
#define ID_DISPLAY   107
#define ID_DRIVERINFO   105
#define ID_DRIVERINFOBACK   100
#define ID_FULLSCREEN   102
#define ID_GRAPHICS   106
#define ID_LIST   103
#define ID_MODE   104
#define ID_NETWORK   109
#define ID_SOUND   108
#define NUM_IVO_TEMPLATES   ( sizeof( s_ivo_templates ) / sizeof( s_ivo_templates[0] ) )

Functions

void DriverInfo_Cache (void)
void DriverInfo_Event (void *ptr, int event)
void DriverInfo_MenuDraw (void)
void GraphicsOptions_ApplyChanges (void *unused, int notification)
void GraphicsOptions_Cache (void)
void GraphicsOptions_CheckConfig (void)
void GraphicsOptions_Event (void *ptr, int event)
void GraphicsOptions_GetInitialVideo (void)
void GraphicsOptions_MenuDraw (void)
void GraphicsOptions_MenuInit (void)
void GraphicsOptions_SetMenuItems (void)
void GraphicsOptions_TQEvent (void *ptr, int event)
void GraphicsOptions_UpdateMenuItems (void)
void UI_DriverInfo_Menu (void)
void UI_GraphicsOptionsMenu (void)

Variables

char * driverinfo_artlist []
driverinfo_t s_driverinfo
const char * s_drivers []
graphicsoptions_t s_graphicsoptions
InitialVideoOptions_s s_ivo
InitialVideoOptions_s s_ivo_templates []


Define Documentation

#define DRIVERINFO_BACK0   "menu/art/back_0"
 

Definition at line 38 of file ui_video.c.

#define DRIVERINFO_BACK1   "menu/art/back_1"
 

Definition at line 39 of file ui_video.c.

#define DRIVERINFO_FRAMEL   "menu/art/frame2_l"
 

Definition at line 36 of file ui_video.c.

#define DRIVERINFO_FRAMER   "menu/art/frame1_r"
 

Definition at line 37 of file ui_video.c.

#define GRAPHICSOPTIONS_ACCEPT0   "menu/art/accept_0"
 

Definition at line 238 of file ui_video.c.

Referenced by GraphicsOptions_Cache().

#define GRAPHICSOPTIONS_ACCEPT1   "menu/art/accept_1"
 

Definition at line 239 of file ui_video.c.

Referenced by GraphicsOptions_Cache().

#define GRAPHICSOPTIONS_BACK0   "menu/art/back_0"
 

Definition at line 236 of file ui_video.c.

Referenced by GraphicsOptions_Cache().

#define GRAPHICSOPTIONS_BACK1   "menu/art/back_1"
 

Definition at line 237 of file ui_video.c.

Referenced by GraphicsOptions_Cache().

#define GRAPHICSOPTIONS_FRAMEL   "menu/art/frame2_l"
 

Definition at line 234 of file ui_video.c.

Referenced by GraphicsOptions_Cache().

#define GRAPHICSOPTIONS_FRAMER   "menu/art/frame1_r"
 

Definition at line 235 of file ui_video.c.

Referenced by GraphicsOptions_Cache().

#define ID_BACK2   101
 

Definition at line 248 of file ui_video.c.

Referenced by GraphicsOptions_Event().

#define ID_DISPLAY   107
 

Definition at line 254 of file ui_video.c.

#define ID_DRIVERINFO   105
 

Definition at line 252 of file ui_video.c.

Referenced by GraphicsOptions_Event().

#define ID_DRIVERINFOBACK   100
 

Definition at line 50 of file ui_video.c.

Referenced by DriverInfo_Event().

#define ID_FULLSCREEN   102
 

Definition at line 249 of file ui_video.c.

#define ID_GRAPHICS   106
 

Definition at line 253 of file ui_video.c.

#define ID_LIST   103
 

Definition at line 250 of file ui_video.c.

#define ID_MODE   104
 

Definition at line 251 of file ui_video.c.

Referenced by GraphicsOptions_Event().

#define ID_NETWORK   109
 

Definition at line 256 of file ui_video.c.

#define ID_SOUND   108
 

Definition at line 255 of file ui_video.c.

#define NUM_IVO_TEMPLATES   ( sizeof( s_ivo_templates ) / sizeof( s_ivo_templates[0] ) )
 

Definition at line 323 of file ui_video.c.


Function Documentation

void DriverInfo_Cache void   ) 
 

Definition at line 122 of file ui_video.c.

References driverinfo_artlist, i, and trap_R_RegisterShaderNoMip().

00123 {
00124     int i;
00125 
00126     // touch all our pics
00127     for (i=0; ;i++)
00128     {
00129         if (!driverinfo_artlist[i])
00130             break;
00131         trap_R_RegisterShaderNoMip(driverinfo_artlist[i]);
00132     }
00133 }

Here is the call graph for this function:

void DriverInfo_Event void *  ptr,
int  event
[static]
 

Definition at line 71 of file ui_video.c.

References ID_DRIVERINFOBACK, and UI_PopMenu().

00072 {
00073     if (event != QM_ACTIVATED)
00074         return;
00075 
00076     switch (((menucommon_s*)ptr)->id)
00077     {
00078         case ID_DRIVERINFOBACK:
00079             UI_PopMenu();
00080             break;
00081     }
00082 }

Here is the call graph for this function:

void DriverInfo_MenuDraw void   )  [static]
 

Definition at line 89 of file ui_video.c.

References color_red, glconfig_t::colorBits, glconfig_t::depthBits, uiStatic_t::glconfig, i, driverinfo_t::menu, Menu_Draw(), driverinfo_t::numstrings, glconfig_t::renderer_string, s_driverinfo, glconfig_t::stencilBits, driverinfo_t::strings, text_color_normal, UI_CENTER, UI_DrawString(), UI_LEFT, UI_RIGHT, UI_SMALLFONT, uis, va(), glconfig_t::vendor_string, glconfig_t::version_string, and y.

00090 {
00091     int i;
00092     int y;
00093 
00094     Menu_Draw( &s_driverinfo.menu );
00095 
00096     UI_DrawString( 320, 80, "VENDOR", UI_CENTER|UI_SMALLFONT, color_red );
00097     UI_DrawString( 320, 152, "PIXELFORMAT", UI_CENTER|UI_SMALLFONT, color_red );
00098     UI_DrawString( 320, 192, "EXTENSIONS", UI_CENTER|UI_SMALLFONT, color_red );
00099 
00100     UI_DrawString( 320, 80+16, uis.glconfig.vendor_string, UI_CENTER|UI_SMALLFONT, text_color_normal );
00101     UI_DrawString( 320, 96+16, uis.glconfig.version_string, UI_CENTER|UI_SMALLFONT, text_color_normal );
00102     UI_DrawString( 320, 112+16, uis.glconfig.renderer_string, UI_CENTER|UI_SMALLFONT, text_color_normal );
00103     UI_DrawString( 320, 152+16, va ("color(%d-bits) Z(%d-bits) stencil(%d-bits)", uis.glconfig.colorBits, uis.glconfig.depthBits, uis.glconfig.stencilBits), UI_CENTER|UI_SMALLFONT, text_color_normal );
00104 
00105     // double column
00106     y = 192+16;
00107     for (i=0; i<s_driverinfo.numstrings/2; i++) {
00108         UI_DrawString( 320-4, y, s_driverinfo.strings[i*2], UI_RIGHT|UI_SMALLFONT, text_color_normal );
00109         UI_DrawString( 320+4, y, s_driverinfo.strings[i*2+1], UI_LEFT|UI_SMALLFONT, text_color_normal );
00110         y += SMALLCHAR_HEIGHT;
00111     }
00112 
00113     if (s_driverinfo.numstrings & 1)
00114         UI_DrawString( 320, y, s_driverinfo.strings[s_driverinfo.numstrings-1], UI_CENTER|UI_SMALLFONT, text_color_normal );
00115 }

Here is the call graph for this function:

void GraphicsOptions_ApplyChanges void *  unused,
int  notification
[static]
 

Definition at line 466 of file ui_video.c.

References graphicsoptions_t::allow_extensions, graphicsoptions_t::colordepth, menuslider_s::curvalue, menulist_s::curvalue, graphicsoptions_t::driver, EXEC_APPEND, graphicsoptions_t::filter, graphicsoptions_t::fs, graphicsoptions_t::geometry, graphicsoptions_t::lighting, graphicsoptions_t::mode, s_drivers, s_graphicsoptions, graphicsoptions_t::texturebits, graphicsoptions_t::tq, trap_Cmd_ExecuteText(), trap_Cvar_Set(), and trap_Cvar_SetValue().

00467 {
00468     if (notification != QM_ACTIVATED)
00469         return;
00470 
00471     switch ( s_graphicsoptions.texturebits.curvalue  )
00472     {
00473     case 0:
00474         trap_Cvar_SetValue( "r_texturebits", 0 );
00475         break;
00476     case 1:
00477         trap_Cvar_SetValue( "r_texturebits", 16 );
00478         break;
00479     case 2:
00480         trap_Cvar_SetValue( "r_texturebits", 32 );
00481         break;
00482     }
00483     trap_Cvar_SetValue( "r_picmip", 3 - s_graphicsoptions.tq.curvalue );
00484     trap_Cvar_SetValue( "r_allowExtensions", s_graphicsoptions.allow_extensions.curvalue );
00485     trap_Cvar_SetValue( "r_mode", s_graphicsoptions.mode.curvalue );
00486     trap_Cvar_SetValue( "r_fullscreen", s_graphicsoptions.fs.curvalue );
00487     trap_Cvar_Set( "r_glDriver", ( char * ) s_drivers[s_graphicsoptions.driver.curvalue] );
00488     switch ( s_graphicsoptions.colordepth.curvalue )
00489     {
00490     case 0:
00491         trap_Cvar_SetValue( "r_colorbits", 0 );
00492         trap_Cvar_SetValue( "r_depthbits", 0 );
00493         trap_Cvar_SetValue( "r_stencilbits", 0 );
00494         break;
00495     case 1:
00496         trap_Cvar_SetValue( "r_colorbits", 16 );
00497         trap_Cvar_SetValue( "r_depthbits", 16 );
00498         trap_Cvar_SetValue( "r_stencilbits", 0 );
00499         break;
00500     case 2:
00501         trap_Cvar_SetValue( "r_colorbits", 32 );
00502         trap_Cvar_SetValue( "r_depthbits", 24 );
00503         break;
00504     }
00505     trap_Cvar_SetValue( "r_vertexLight", s_graphicsoptions.lighting.curvalue );
00506 
00507     if ( s_graphicsoptions.geometry.curvalue == 2 )
00508     {
00509         trap_Cvar_SetValue( "r_lodBias", 0 );
00510         trap_Cvar_SetValue( "r_subdivisions", 4 );
00511     }
00512     else if ( s_graphicsoptions.geometry.curvalue == 1 )
00513     {
00514         trap_Cvar_SetValue( "r_lodBias", 1 );
00515         trap_Cvar_SetValue( "r_subdivisions", 12 );
00516     }
00517     else
00518     {
00519         trap_Cvar_SetValue( "r_lodBias", 1 );
00520         trap_Cvar_SetValue( "r_subdivisions", 20 );
00521     }
00522 
00523     if ( s_graphicsoptions.filter.curvalue )
00524     {
00525         trap_Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_LINEAR" );
00526     }
00527     else
00528     {
00529         trap_Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" );
00530     }
00531 
00532     trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart\n" );
00533 }

Here is the call graph for this function:

void GraphicsOptions_Cache void   ) 
 

Definition at line 1050 of file ui_video.c.

References GRAPHICSOPTIONS_ACCEPT0, GRAPHICSOPTIONS_ACCEPT1, GRAPHICSOPTIONS_BACK0, GRAPHICSOPTIONS_BACK1, GRAPHICSOPTIONS_FRAMEL, GRAPHICSOPTIONS_FRAMER, and trap_R_RegisterShaderNoMip().

01050                                    {
01051     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_FRAMEL );
01052     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_FRAMER );
01053     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_BACK0 );
01054     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_BACK1 );
01055     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_ACCEPT0 );
01056     trap_R_RegisterShaderNoMip( GRAPHICSOPTIONS_ACCEPT1 );
01057 }

Here is the call graph for this function:

void GraphicsOptions_CheckConfig void   )  [static]
 

Definition at line 349 of file ui_video.c.

References graphicsoptions_t::colordepth, InitialVideoOptions_s::colordepth, menuslider_s::curvalue, menulist_s::curvalue, graphicsoptions_t::driver, InitialVideoOptions_s::driver, graphicsoptions_t::filter, InitialVideoOptions_s::filter, graphicsoptions_t::fs, InitialVideoOptions_s::fullscreen, graphicsoptions_t::geometry, InitialVideoOptions_s::geometry, i, graphicsoptions_t::lighting, InitialVideoOptions_s::lighting, graphicsoptions_t::list, graphicsoptions_t::mode, InitialVideoOptions_s::mode, s_graphicsoptions, s_ivo_templates, graphicsoptions_t::tq, and InitialVideoOptions_s::tq.

Referenced by GraphicsOptions_UpdateMenuItems().

00350 {
00351     int i;
00352 
00353     for ( i = 0; i < NUM_IVO_TEMPLATES; i++ )
00354     {
00355         if ( s_ivo_templates[i].colordepth != s_graphicsoptions.colordepth.curvalue )
00356             continue;
00357         if ( s_ivo_templates[i].driver != s_graphicsoptions.driver.curvalue )
00358             continue;
00359         if ( s_ivo_templates[i].mode != s_graphicsoptions.mode.curvalue )
00360             continue;
00361         if ( s_ivo_templates[i].fullscreen != s_graphicsoptions.fs.curvalue )
00362             continue;
00363         if ( s_ivo_templates[i].tq != s_graphicsoptions.tq.curvalue )
00364             continue;
00365         if ( s_ivo_templates[i].lighting != s_graphicsoptions.lighting.curvalue )
00366             continue;
00367         if ( s_ivo_templates[i].geometry != s_graphicsoptions.geometry.curvalue )
00368             continue;
00369         if ( s_ivo_templates[i].filter != s_graphicsoptions.filter.curvalue )
00370             continue;
00371 //      if ( s_ivo_templates[i].texturebits != s_graphicsoptions.texturebits.curvalue )
00372 //          continue;
00373         s_graphicsoptions.list.curvalue = i;
00374         return;
00375     }
00376     s_graphicsoptions.list.curvalue = 4;
00377 }

void GraphicsOptions_Event void *  ptr,
int  event
[static]
 

Definition at line 540 of file ui_video.c.

References InitialVideoOptions_s::colordepth, graphicsoptions_t::colordepth, menuslider_s::curvalue, menulist_s::curvalue, graphicsoptions_t::driver, InitialVideoOptions_s::filter, graphicsoptions_t::filter, graphicsoptions_t::fs, InitialVideoOptions_s::fullscreen, InitialVideoOptions_s::geometry, graphicsoptions_t::geometry, ID_BACK2, ID_DISPLAY, ID_DRIVERINFO, ID_GRAPHICS, ID_LIST, ID_MODE, ID_NETWORK, ID_SOUND, InitialVideoOptions_s::lighting, graphicsoptions_t::lighting, graphicsoptions_t::list, InitialVideoOptions_s::mode, graphicsoptions_t::mode, s_graphicsoptions, s_ivo_templates, InitialVideoOptions_s::texturebits, graphicsoptions_t::texturebits, InitialVideoOptions_s::tq, graphicsoptions_t::tq, UI_DisplayOptionsMenu(), UI_DriverInfo_Menu(), UI_NetworkOptionsMenu(), UI_PopMenu(), and UI_SoundOptionsMenu().

00540                                                           {
00541     InitialVideoOptions_s *ivo;
00542 
00543     if( event != QM_ACTIVATED ) {
00544         return;
00545     }
00546 
00547     switch( ((menucommon_s*)ptr)->id ) {
00548     case ID_MODE:
00549         // clamp 3dfx video modes
00550         if ( s_graphicsoptions.driver.curvalue == 1 )
00551         {
00552             if ( s_graphicsoptions.mode.curvalue < 2 )
00553                 s_graphicsoptions.mode.curvalue = 2;
00554             else if ( s_graphicsoptions.mode.curvalue > 6 )
00555                 s_graphicsoptions.mode.curvalue = 6;
00556         }
00557         break;
00558 
00559     case ID_LIST:
00560         ivo = &s_ivo_templates[s_graphicsoptions.list.curvalue];
00561 
00562         s_graphicsoptions.mode.curvalue        = ivo->mode;
00563         s_graphicsoptions.tq.curvalue          = ivo->tq;
00564         s_graphicsoptions.lighting.curvalue    = ivo->lighting;
00565         s_graphicsoptions.colordepth.curvalue  = ivo->colordepth;
00566         s_graphicsoptions.texturebits.curvalue = ivo->texturebits;
00567         s_graphicsoptions.geometry.curvalue    = ivo->geometry;
00568         s_graphicsoptions.filter.curvalue      = ivo->filter;
00569         s_graphicsoptions.fs.curvalue          = ivo->fullscreen;
00570         break;
00571 
00572     case ID_DRIVERINFO:
00573         UI_DriverInfo_Menu();
00574         break;
00575 
00576     case ID_BACK2:
00577         UI_PopMenu();
00578         break;
00579 
00580     case ID_GRAPHICS:
00581         break;
00582 
00583     case ID_DISPLAY:
00584         UI_PopMenu();
00585         UI_DisplayOptionsMenu();
00586         break;
00587 
00588     case ID_SOUND:
00589         UI_PopMenu();
00590         UI_SoundOptionsMenu();
00591         break;
00592 
00593     case ID_NETWORK:
00594         UI_PopMenu();
00595         UI_NetworkOptionsMenu();
00596         break;
00597     }
00598 }

Here is the call graph for this function:

void GraphicsOptions_GetInitialVideo void   )  [static]
 

Definition at line 330 of file ui_video.c.

References graphicsoptions_t::allow_extensions, graphicsoptions_t::colordepth, InitialVideoOptions_s::colordepth, menuslider_s::curvalue, menulist_s::curvalue, graphicsoptions_t::driver, InitialVideoOptions_s::driver, InitialVideoOptions_s::extensions, graphicsoptions_t::filter, InitialVideoOptions_s::filter, graphicsoptions_t::fs, InitialVideoOptions_s::fullscreen, graphicsoptions_t::geometry, InitialVideoOptions_s::geometry, graphicsoptions_t::lighting, InitialVideoOptions_s::lighting, graphicsoptions_t::mode, InitialVideoOptions_s::mode, s_graphicsoptions, s_ivo, graphicsoptions_t::texturebits, InitialVideoOptions_s::texturebits, graphicsoptions_t::tq, and InitialVideoOptions_s::tq.

Referenced by GraphicsOptions_MenuInit().

void GraphicsOptions_MenuDraw void   ) 
 

Definition at line 619 of file ui_video.c.

References GraphicsOptions_UpdateMenuItems(), graphicsoptions_t::menu, Menu_Draw(), and s_graphicsoptions.

00620 {
00621 //APSFIX - rework this
00622     GraphicsOptions_UpdateMenuItems();
00623 
00624     Menu_Draw( &s_graphicsoptions.menu );
00625 }

Here is the call graph for this function:

void GraphicsOptions_MenuInit void   ) 
 

Definition at line 720 of file ui_video.c.

References graphicsoptions_t::allow_extensions, graphicsoptions_t::apply, graphicsoptions_t::back, graphicsoptions_t::banner, BIGCHAR_HEIGHT, menucommon_s::callback, menutext_s::color, graphicsoptions_t::colordepth, menulist_s::curvalue, graphicsoptions_t::display, _tag_menuframework::draw, graphicsoptions_t::driver, graphicsoptions_t::driverinfo, glconfig_t::driverType, graphicsoptions_t::filter, menucommon_s::flags, menubitmap_s::focuspic, graphicsoptions_t::framel, graphicsoptions_t::framer, graphicsoptions_t::fs, _tag_menuframework::fullscreen, menuslider_s::generic, menulist_s::generic, menubitmap_s::generic, menutext_s::generic, graphicsoptions_t::geometry, uiStatic_t::glconfig, GLDRV_ICD, graphicsoptions_t::graphics, GraphicsOptions_Cache(), GraphicsOptions_GetInitialVideo(), GraphicsOptions_SetMenuItems(), glconfig_t::hardwareType, menubitmap_s::height, menucommon_s::id, menulist_s::itemnames, graphicsoptions_t::lighting, graphicsoptions_t::list, menuslider_s::maxvalue, memset(), graphicsoptions_t::menu, Menu_AddItem(), menuslider_s::minvalue, graphicsoptions_t::mode, menucommon_s::name, graphicsoptions_t::network, QMF_CENTER_JUSTIFY, QMF_HIDDEN, QMF_LEFT_JUSTIFY, QMF_PULSEIFFOCUS, QMF_RIGHT_JUSTIFY, s_graphicsoptions, graphicsoptions_t::sound, menutext_s::string, menutext_s::style, graphicsoptions_t::texturebits, graphicsoptions_t::tq, menucommon_s::type, UI_CENTER, uis, menubitmap_s::width, _tag_menuframework::wrapAround, menucommon_s::x, y, and menucommon_s::y.

Referenced by UI_GraphicsOptionsMenu().

00721 {
00722     static const char *s_driver_names[] =
00723     {
00724         "Default",
00725         "Voodoo",
00726         0
00727     };
00728 
00729     static const char *tq_names[] =
00730     {
00731         "Default",
00732         "16 bit",
00733         "32 bit",
00734         0
00735     };
00736 
00737     static const char *s_graphics_options_names[] =
00738     {
00739         "High Quality",
00740         "Normal",
00741         "Fast",
00742         "Fastest",
00743         "Custom",
00744         0
00745     };
00746 
00747     static const char *lighting_names[] =
00748     {
00749         "Lightmap",
00750         "Vertex",
00751         0
00752     };
00753 
00754     static const char *colordepth_names[] =
00755     {
00756         "Default",
00757         "16 bit",
00758         "32 bit",
00759         0
00760     };
00761 
00762     static const char *resolutions[] = 
00763     {
00764         "320x240",
00765         "400x300",
00766         "512x384",
00767         "640x480",
00768         "800x600",
00769         "960x720",
00770         "1024x768",
00771         "1152x864",
00772         "1280x1024",
00773         "1600x1200",
00774         "2048x1536",
00775         "856x480 wide screen",
00776         0
00777     };
00778     static const char *filter_names[] =
00779     {
00780         "Bilinear",
00781         "Trilinear",
00782         0
00783     };
00784     static const char *quality_names[] =
00785     {
00786         "Low",
00787         "Medium",
00788         "High",
00789         0
00790     };
00791     static const char *enabled_names[] =
00792     {
00793         "Off",
00794         "On",
00795         0
00796     };
00797 
00798     int y;
00799 
00800     // zero set all our globals
00801     memset( &s_graphicsoptions, 0 ,sizeof(graphicsoptions_t) );
00802 
00803     GraphicsOptions_Cache();
00804 
00805     s_graphicsoptions.menu.wrapAround = qtrue;
00806     s_graphicsoptions.menu.fullscreen = qtrue;
00807     s_graphicsoptions.menu.draw       = GraphicsOptions_MenuDraw;
00808 
00809     s_graphicsoptions.banner.generic.type  = MTYPE_BTEXT;
00810     s_graphicsoptions.banner.generic.x     = 320;
00811     s_graphicsoptions.banner.generic.y     = 16;
00812     s_graphicsoptions.banner.string        = "SYSTEM SETUP";
00813     s_graphicsoptions.banner.color         = color_white;
00814     s_graphicsoptions.banner.style         = UI_CENTER;
00815 
00816     s_graphicsoptions.framel.generic.type  = MTYPE_BITMAP;
00817     s_graphicsoptions.framel.generic.name  = GRAPHICSOPTIONS_FRAMEL;
00818     s_graphicsoptions.framel.generic.flags = QMF_INACTIVE;
00819     s_graphicsoptions.framel.generic.x     = 0;
00820     s_graphicsoptions.framel.generic.y     = 78;
00821     s_graphicsoptions.framel.width         = 256;
00822     s_graphicsoptions.framel.height        = 329;
00823 
00824     s_graphicsoptions.framer.generic.type  = MTYPE_BITMAP;
00825     s_graphicsoptions.framer.generic.name  = GRAPHICSOPTIONS_FRAMER;
00826     s_graphicsoptions.framer.generic.flags = QMF_INACTIVE;
00827     s_graphicsoptions.framer.generic.x     = 376;
00828     s_graphicsoptions.framer.generic.y     = 76;
00829     s_graphicsoptions.framer.width         = 256;
00830     s_graphicsoptions.framer.height        = 334;
00831 
00832     s_graphicsoptions.graphics.generic.type     = MTYPE_PTEXT;
00833     s_graphicsoptions.graphics.generic.flags    = QMF_RIGHT_JUSTIFY;
00834     s_graphicsoptions.graphics.generic.id       = ID_GRAPHICS;
00835     s_graphicsoptions.graphics.generic.callback = GraphicsOptions_Event;
00836     s_graphicsoptions.graphics.generic.x        = 216;
00837     s_graphicsoptions.graphics.generic.y        = 240 - 2 * PROP_HEIGHT;
00838     s_graphicsoptions.graphics.string           = "GRAPHICS";
00839     s_graphicsoptions.graphics.style            = UI_RIGHT;
00840     s_graphicsoptions.graphics.color            = color_red;
00841 
00842     s_graphicsoptions.display.generic.type      = MTYPE_PTEXT;
00843     s_graphicsoptions.display.generic.flags     = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
00844     s_graphicsoptions.display.generic.id        = ID_DISPLAY;
00845     s_graphicsoptions.display.generic.callback  = GraphicsOptions_Event;
00846     s_graphicsoptions.display.generic.x         = 216;
00847     s_graphicsoptions.display.generic.y         = 240 - PROP_HEIGHT;
00848     s_graphicsoptions.display.string            = "DISPLAY";
00849     s_graphicsoptions.display.style             = UI_RIGHT;
00850     s_graphicsoptions.display.color             = color_red;
00851 
00852     s_graphicsoptions.sound.generic.type        = MTYPE_PTEXT;
00853     s_graphicsoptions.sound.generic.flags       = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
00854     s_graphicsoptions.sound.generic.id          = ID_SOUND;
00855     s_graphicsoptions.sound.generic.callback    = GraphicsOptions_Event;
00856     s_graphicsoptions.sound.generic.x           = 216;
00857     s_graphicsoptions.sound.generic.y           = 240;
00858     s_graphicsoptions.sound.string              = "SOUND";
00859     s_graphicsoptions.sound.style               = UI_RIGHT;
00860     s_graphicsoptions.sound.color               = color_red;
00861 
00862     s_graphicsoptions.network.generic.type      = MTYPE_PTEXT;
00863     s_graphicsoptions.network.generic.flags     = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
00864     s_graphicsoptions.network.generic.id        = ID_NETWORK;
00865     s_graphicsoptions.network.generic.callback  = GraphicsOptions_Event;
00866     s_graphicsoptions.network.generic.x         = 216;
00867     s_graphicsoptions.network.generic.y         = 240 + PROP_HEIGHT;
00868     s_graphicsoptions.network.string            = "NETWORK";
00869     s_graphicsoptions.network.style             = UI_RIGHT;
00870     s_graphicsoptions.network.color             = color_red;
00871 
00872     y = 240 - 6 * (BIGCHAR_HEIGHT + 2);
00873     s_graphicsoptions.list.generic.type     = MTYPE_SPINCONTROL;
00874     s_graphicsoptions.list.generic.name     = "Graphics Settings:";
00875     s_graphicsoptions.list.generic.flags    = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
00876     s_graphicsoptions.list.generic.x        = 400;
00877     s_graphicsoptions.list.generic.y        = y;
00878     s_graphicsoptions.list.generic.callback = GraphicsOptions_Event;
00879     s_graphicsoptions.list.generic.id       = ID_LIST;
00880     s_graphicsoptions.list.itemnames        = s_graphics_options_names;
00881     y += 2 * ( BIGCHAR_HEIGHT + 2 );
00882 
00883     s_graphicsoptions.driver.generic.type  = MTYPE_SPINCONTROL;
00884     s_graphicsoptions.driver.generic.name  = "GL Driver:";
00885     s_graphicsoptions.driver.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
00886     s_graphicsoptions.driver.generic.x     = 400;
00887     s_graphicsoptions.driver.generic.y     = y;
00888     s_graphicsoptions.driver.itemnames     = s_driver_names;
00889     s_graphicsoptions.driver.curvalue      = (uis.glconfig.driverType == GLDRV_VOODOO);
00890     y += BIGCHAR_HEIGHT+2;
00891 
00892     // references/modifies "r_allowExtensions"
00893     s_graphicsoptions.allow_extensions.generic.type     = MTYPE_SPINCONTROL;
00894     s_graphicsoptions.allow_extensions.generic.name     = "GL Extensions:";
00895     s_graphicsoptions.allow_extensions.generic.flags    = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
00896     s_graphicsoptions.allow_extensions.generic.x        = 400;
00897     s_graphicsoptions.allow_extensions.generic.y        = y;
00898     s_graphicsoptions.allow_extensions.itemnames        = enabled_names;
00899     y += BIGCHAR_HEIGHT+2;
00900 
00901     // references/modifies "r_mode"
00902     s_graphicsoptions.mode.generic.type     = MTYPE_SPINCONTROL;
00903     s_graphicsoptions.mode.generic.name     = "Video Mode:";
00904     s_graphicsoptions.mode.generic.flags    = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
00905     s_graphicsoptions.mode.generic.x        = 400;
00906     s_graphicsoptions.mode.generic.y        = y;
00907     s_graphicsoptions.mode.itemnames        = resolutions;
00908     s_graphicsoptions.mode.generic.callback = GraphicsOptions_Event;
00909     s_graphicsoptions.mode.generic.id       = ID_MODE;
00910     y += BIGCHAR_HEIGHT+2;
00911 
00912     // references "r_colorbits"
00913     s_graphicsoptions.colordepth.generic.type     = MTYPE_SPINCONTROL;
00914     s_graphicsoptions.colordepth.generic.name     = "Color Depth:";
00915     s_graphicsoptions.colordepth.generic.flags    = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
00916     s_graphicsoptions.colordepth.generic.x        = 400;
00917     s_graphicsoptions.colordepth.generic.y        = y;
00918     s_graphicsoptions.colordepth.itemnames        =