Rework the scale menu option to be more intuitive.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@703 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Sander van Dijk 2012-09-03 19:47:16 +00:00
parent bf62017608
commit 64b53c510c
2 changed files with 9 additions and 11 deletions

View file

@ -83,7 +83,6 @@ cvar_t scr_sbarscale = {"scr_sbarscale", "1", CVAR_ARCHIVE};
cvar_t scr_sbaralpha = {"scr_sbaralpha", "0.7", CVAR_ARCHIVE};
cvar_t scr_conwidth = {"scr_conwidth", "0", CVAR_ARCHIVE};
cvar_t scr_conscale = {"scr_conscale", "1", CVAR_ARCHIVE};
cvar_t scr_scale = {"scr_scale", "1", CVAR_ARCHIVE};
cvar_t scr_crosshairscale = {"scr_crosshairscale", "1", CVAR_ARCHIVE};
cvar_t scr_showfps = {"scr_showfps", "0", CVAR_NONE};
cvar_t scr_clock = {"scr_clock", "0", CVAR_NONE};
@ -377,7 +376,6 @@ void SCR_Init (void)
Cvar_SetCallback (&scr_conscale, &SCR_Conwidth_f);
Cvar_RegisterVariable (&scr_conwidth);
Cvar_RegisterVariable (&scr_conscale);
Cvar_RegisterVariable (&scr_scale);
Cvar_RegisterVariable (&scr_crosshairscale);
Cvar_RegisterVariable (&scr_showfps);
Cvar_RegisterVariable (&scr_clock);

View file

@ -988,14 +988,14 @@ void M_AdjustSliders (int dir)
switch (options_cursor)
{
case OPT_SCALE: // console and menu scale
f = scr_scale.value + dir * .1; // or .2
if (f < 1) f = 1;
else if (f > 6) f = 6;
Cvar_SetValue ("scr_scale", f);
// status bar size increases half as fast
Cvar_SetValue ("scr_sbarscale", (scr_scale.value - 1)/2 + 1);
Cvar_SetValue ("scr_conscale", scr_scale.value);
Cvar_SetValue ("scr_menuscale", scr_scale.value);
f = scr_conscale.value + dir * .1;
if (f < 1)
f = 1;
else if (f > (vid.width / 32) / 10.0)
f = (vid.width / 32) / 10.0;
Cvar_SetValue ("scr_conscale", f);
Cvar_SetValue ("scr_menuscale", f);
Cvar_SetValue ("scr_sbarscale", f);
break;
case OPT_SCRSIZE: // screen size
f = scr_viewsize.value + dir * 10;
@ -1120,7 +1120,7 @@ void M_Options_Draw (void)
// OPT_SCALE:
M_Print (16, 32 + 8*OPT_SCALE, " Scale");
r = (scr_scale.value-1)/5 ; // r ranges from 0 to 1, scr_scale from 1 to 6
r = (scr_conscale.value - 1) / (((vid.width / 32) / 10.0) - 1);
M_DrawSlider (220, 32 + 8*OPT_SCALE, r);
// OPT_SCRSIZE: