mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-02-16 16:51:16 +00:00
Menu system is a bit more modular now and we have a workaround the problem
with the 'holes', we are using a (local) variable and incrementing it by 8 instead of using static values. -- Eric Windisch
This commit is contained in:
parent
f1c9f11a2c
commit
2021a48efc
15 changed files with 67 additions and 59 deletions
|
@ -443,7 +443,7 @@ void VID_Init(unsigned char *palette)
|
|||
vid.recalc_refdef = 1; // force a surface cache flush
|
||||
}
|
||||
|
||||
void VID_ExtraOptionDraw(void)
|
||||
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
/* Port specific Options menu entrys */
|
||||
}
|
||||
|
|
|
@ -809,18 +809,18 @@ void IN_Move (usercmd_t *cmd)
|
|||
IN_MouseMove(cmd);
|
||||
}
|
||||
|
||||
void VID_ExtraOptionDraw(void)
|
||||
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
|
||||
|
||||
// Windowed Mouse
|
||||
M_Print (16, 128, " Use Mouse");
|
||||
M_DrawCheckbox (220, 128, _windowed_mouse.value);
|
||||
M_Print (16, options_draw_cursor+=8, " Use Mouse");
|
||||
M_DrawCheckbox (220, options_draw_cursor, _windowed_mouse.value);
|
||||
|
||||
|
||||
#if defined(XMESA)
|
||||
// Mesa has a fullscreen / windowed glx hack.
|
||||
M_Print (16, 136, " Fullscreen");
|
||||
M_DrawCheckbox (220, 136, vid_glx_mode.value);
|
||||
M_Print (16, options_draw_cursor+=8, " Fullscreen");
|
||||
M_DrawCheckbox (220, options_draw_cursor, vid_glx_mode.value);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -842,8 +842,8 @@ void VID_ExtraOptionCmd(int option_cursor)
|
|||
} else {
|
||||
#endif
|
||||
|
||||
#ifdef HAS_DGA
|
||||
// Currently broken: fixme!
|
||||
/* thing for people without glide to fallback on..
|
||||
Write ME!!
|
||||
if(vid_glx_mode.value)
|
||||
{
|
||||
// install_grabs();
|
||||
|
@ -851,8 +851,7 @@ void VID_ExtraOptionCmd(int option_cursor)
|
|||
// uninstall_grabs();
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
*/
|
||||
#ifdef XMESA
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1945,11 +1945,11 @@ void VID_MenuKey (int key)
|
|||
}
|
||||
}
|
||||
|
||||
void VID_ExtraOptionDraw(void)
|
||||
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
// Windowed Mouse
|
||||
M_Print (16, 128, " Use Mouse");
|
||||
M_DrawCheckbox (220, 128, _windowed_mouse.value);
|
||||
M_Print (16, options_draw_cursor+=8, " Use Mouse");
|
||||
M_DrawCheckbox (220, options_draw_cursor, _windowed_mouse.value);
|
||||
}
|
||||
|
||||
void VID_ExtraOptionCmd(int option_cursor)
|
||||
|
|
|
@ -61,6 +61,8 @@ extern unsigned d_8to24table[256];
|
|||
extern void (*vid_menudrawfn)(void);
|
||||
extern void (*vid_menukeyfn)(int key);
|
||||
|
||||
extern unsigned int options_draw_cursor;
|
||||
|
||||
void VID_SetPalette (unsigned char *palette);
|
||||
// called at startup and after any gamma correction
|
||||
|
||||
|
@ -85,7 +87,7 @@ int VID_SetMode (int modenum, unsigned char *palette);
|
|||
void VID_HandlePause (qboolean pause);
|
||||
// called only on Win32, when pause happens, so the mouse can be released
|
||||
|
||||
void VID_ExtraOptionDraw(void);
|
||||
void VID_ExtraOptionDraw(unsigned int);
|
||||
// draw extra option menu entries
|
||||
|
||||
void VID_ExtraOptionCmd(int options_cursor);
|
||||
|
|
|
@ -781,7 +781,7 @@ void VID_MenuKey (int key)
|
|||
}
|
||||
}
|
||||
|
||||
void VID_ExtraOptionDraw(void)
|
||||
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
/* Port specific Options menu entrys */
|
||||
}
|
||||
|
|
|
@ -927,11 +927,11 @@ void IN_Move(usercmd_t *cmd)
|
|||
mouse_x = mouse_y = 0.0;
|
||||
}
|
||||
|
||||
void VID_ExtraOptionDraw(void)
|
||||
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
// Windowed Mouse
|
||||
M_Print (16, 128, " Use Mouse");
|
||||
M_DrawCheckbox (220, 128, _windowed_mouse.value);
|
||||
M_Print (16, options_draw_cursor+=8, " Use Mouse");
|
||||
M_DrawCheckbox (220, options_draw_cursor, _windowed_mouse.value);
|
||||
}
|
||||
|
||||
void VID_ExtraOptionCmd(int option_cursor)
|
||||
|
|
|
@ -89,7 +89,7 @@ void D_EndDirectRect (int x, int y, int width, int height)
|
|||
{
|
||||
}
|
||||
|
||||
void VID_ExtraOptionDraw(void)
|
||||
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
/* Port specific Options menu entrys */
|
||||
}
|
||||
|
|
|
@ -430,10 +430,10 @@ char *Sys_ConsoleInput (void)
|
|||
}
|
||||
*/
|
||||
|
||||
void VID_ExtraOptionDraw(void)
|
||||
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
// Windowed Mouse
|
||||
M_Print (16, 128, " Use Mouse");
|
||||
M_Print (16, options_draw_cursor+=8, " Use Mouse");
|
||||
M_DrawCheckbox (220, 128, _windowed_mouse.value);
|
||||
}
|
||||
|
||||
|
|
|
@ -1257,11 +1257,11 @@ void IN_Move (usercmd_t *cmd)
|
|||
mouse_x = mouse_y = 0.0;
|
||||
}
|
||||
|
||||
void VID_ExtraOptionDraw(void)
|
||||
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
// Windowed Mouse
|
||||
M_Print (16, 128, " Use Mouse");
|
||||
M_DrawCheckbox (220, 128, _windowed_mouse.value);
|
||||
M_Print (16, options_draw_cursor+=8, " Use Mouse");
|
||||
M_DrawCheckbox (220, options_draw_cursor, _windowed_mouse.value);
|
||||
}
|
||||
|
||||
void VID_ExtraOptionCmd(int option_cursor)
|
||||
|
|
|
@ -1265,11 +1265,11 @@ void IN_Move (usercmd_t *cmd)
|
|||
mouse_x = mouse_y = 0.0;
|
||||
}
|
||||
|
||||
void VID_ExtraOptionDraw(void)
|
||||
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
// Windowed Mouse
|
||||
M_Print (16, 128, " Use Mouse");
|
||||
M_DrawCheckbox (220, 128, _windowed_mouse.value);
|
||||
M_Print (16, options_draw_cursor+=8, " Use Mouse");
|
||||
M_DrawCheckbox (220, options_draw_cursor, _windowed_mouse.value);
|
||||
}
|
||||
|
||||
void VID_ExtraOptionCmd(int option_cursor)
|
||||
|
|
|
@ -647,7 +647,7 @@ VID_ModeInfo (int modenum)
|
|||
|
||||
|
||||
void
|
||||
VID_ExtraOptionDraw(void)
|
||||
VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
/* No extra option menu items yet */
|
||||
}
|
||||
|
|
|
@ -3392,12 +3392,12 @@ void VID_MenuKey (int key)
|
|||
}
|
||||
}
|
||||
|
||||
void VID_ExtraOptionDraw(void)
|
||||
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
|
||||
{
|
||||
if (modestate == MS_WINDOWED) {
|
||||
// Windowed Mouse
|
||||
M_Print (16, 128, " Use Mouse");
|
||||
M_DrawCheckbox (220, 128, _windowed_mouse.value);
|
||||
M_Print (16, options_draw_cursor+=8, " Use Mouse");
|
||||
M_DrawCheckbox (220, options_draw_cursor, _windowed_mouse.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1091,8 +1091,8 @@ void IN_Move (usercmd_t *cmd)
|
|||
void VID_ExtraOptionDraw(void)
|
||||
{
|
||||
// Windowed Mouse
|
||||
M_Print (16, 128, " Use Mouse");
|
||||
M_DrawCheckbox(220, 128, _windowed_mouse.value);
|
||||
M_Print (16, options_draw_cursor+=8, " Use Mouse");
|
||||
M_DrawCheckbox(220, options_draw_cursor, _windowed_mouse.value);
|
||||
}
|
||||
|
||||
void VID_ExtraOptionCmd(int option_cursor)
|
||||
|
|
|
@ -1064,10 +1064,12 @@ again:
|
|||
|
||||
|
||||
#define SLIDER_RANGE 10
|
||||
#define L_OPTIONS_ITEMS 13
|
||||
|
||||
extern int VID_options_items;
|
||||
static int options_cursor;
|
||||
#define options_items 15
|
||||
|
||||
#define options_items (L_OPTIONS_ITEMS+VID_options_items)
|
||||
|
||||
void M_Menu_Options_f (void)
|
||||
{
|
||||
|
@ -1200,49 +1202,54 @@ void M_Options_Draw (void)
|
|||
float r;
|
||||
qpic_t *p;
|
||||
|
||||
unsigned int options_draw_cursor=32;
|
||||
|
||||
M_DrawTransPic (16, 4, Draw_CachePic ("gfx/qplaque.lmp") );
|
||||
p = Draw_CachePic ("gfx/p_option.lmp");
|
||||
M_DrawPic ( (320-p->width)/2, 4, p);
|
||||
|
||||
M_Print (16, 32, " Customize controls");
|
||||
M_Print (16, 40, " Go to console");
|
||||
M_Print (16, 48, " Reset to defaults");
|
||||
M_Print (16, options_draw_cursor, " Customize controls");
|
||||
M_Print (16, options_draw_cursor+=8, " Go to console");
|
||||
M_Print (16, options_draw_cursor+=8, " Reset to defaults");
|
||||
|
||||
M_Print (16, 56, " Screen size");
|
||||
M_Print (16, options_draw_cursor+=8, " Screen size");
|
||||
r = (scr_viewsize.value - 30) / (120 - 30);
|
||||
M_DrawSlider (220, 56, r);
|
||||
M_DrawSlider (220, options_draw_cursor, r);
|
||||
|
||||
M_Print (16, 64, " Brightness");
|
||||
M_Print (16, options_draw_cursor+=8, " Brightness");
|
||||
r = (1.0 - v_gamma.value) / 0.5;
|
||||
M_DrawSlider (220, 64, r);
|
||||
M_DrawSlider (220, options_draw_cursor, r);
|
||||
|
||||
M_Print (16, 72, " Mouse Speed");
|
||||
M_Print (16, options_draw_cursor+=8, " Mouse Speed");
|
||||
r = (sensitivity.value - 1)/10;
|
||||
M_DrawSlider (220, 72, r);
|
||||
|
||||
M_Print (16, 80, " CD Music Volume");
|
||||
M_Print (16, options_draw_cursor+=8, " CD Music Volume");
|
||||
r = bgmvolume.value;
|
||||
M_DrawSlider (220, 80, r);
|
||||
M_DrawSlider (220, options_draw_cursor, r);
|
||||
|
||||
M_Print (16, 88, " Sound Volume");
|
||||
M_Print (16, options_draw_cursor+=8, " Sound Volume");
|
||||
r = volume.value;
|
||||
M_DrawSlider (220, 88, r);
|
||||
M_DrawSlider (220, options_draw_cursor, r);
|
||||
|
||||
M_Print (16, 96, " Always Run");
|
||||
M_DrawCheckbox (220, 96, cl_forwardspeed.value > 200);
|
||||
M_Print (16, options_draw_cursor+=8, " Always Run");
|
||||
M_DrawCheckbox (220, options_draw_cursor, cl_forwardspeed.value
|
||||
> 200);
|
||||
|
||||
M_Print (16, 104, " Invert Mouse");
|
||||
M_DrawCheckbox (220, 104, m_pitch.value < 0);
|
||||
M_Print (16, options_draw_cursor+=8, " Invert Mouse");
|
||||
M_DrawCheckbox (220, options_draw_cursor, m_pitch.value < 0);
|
||||
|
||||
M_Print (16, 112, " Lookspring");
|
||||
M_DrawCheckbox (220, 112, lookspring.value);
|
||||
M_Print (16, options_draw_cursor+=8, " Lookspring");
|
||||
M_DrawCheckbox (220, options_draw_cursor, lookspring.value);
|
||||
|
||||
M_Print (16, 120, " Lookstrafe");
|
||||
M_DrawCheckbox (220, 120, lookstrafe.value);
|
||||
M_Print (16, options_draw_cursor+=8, " Lookstrafe");
|
||||
M_DrawCheckbox (220, options_draw_cursor, lookstrafe.value);
|
||||
|
||||
if (vid_menudrawfn) M_Print (16, 144, " Video Options");
|
||||
VID_ExtraOptionDraw(options_draw_cursor);
|
||||
options_draw_cursor+=VID_options_items*8;
|
||||
|
||||
VID_ExtraOptionDraw();
|
||||
if (vid_menudrawfn)
|
||||
M_Print (16, options_draw_cursor+=8, " Video Options");
|
||||
|
||||
// cursor
|
||||
M_DrawCharacter (200, 32 + options_cursor*8, 12+((int)(realtime*4)&1));
|
||||
|
@ -1323,7 +1330,7 @@ void M_Options_Key (int k)
|
|||
}
|
||||
}
|
||||
#else
|
||||
if ((options_cursor == options_items-1) && (modestate != MS_WINDOWED))
|
||||
if (options_cursor == options_items-1)
|
||||
{
|
||||
switch (k) {
|
||||
case KP_UPARROW:
|
||||
|
|
|
@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define MNET_TCP 2
|
||||
|
||||
extern int m_activenet;
|
||||
extern int options_items;
|
||||
|
||||
//
|
||||
// menus
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue