mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-25 21:41:57 +00:00
Menu fixes: use Cvar_SetValue() for menu options.
This commit is contained in:
parent
7bbb9963cc
commit
347289ec56
1 changed files with 12 additions and 15 deletions
|
@ -406,41 +406,38 @@ void M_AdjustSliders (int dir)
|
||||||
|
|
||||||
switch (options_cursor) {
|
switch (options_cursor) {
|
||||||
case 3: // screen size
|
case 3: // screen size
|
||||||
Cvar_Set(scr_viewsize, va("%d",
|
Cvar_SetValue(scr_viewsize, bound(30, (int)scr_viewsize->value + (dir * 10), 120));
|
||||||
bound(30, (int)scr_viewsize->value + (dir * 10), 120)));
|
|
||||||
break;
|
break;
|
||||||
case 4: // gamma
|
case 4: // gamma
|
||||||
Cvar_Set(v_gamma, va("%f",
|
Cvar_SetValue(v_gamma, bound(0.5, v_gamma->value - (dir * 0.05), 1));
|
||||||
bound(0.5, v_gamma->value - (dir * 0.05), 1)));
|
|
||||||
break;
|
break;
|
||||||
case 5: // mouse speed
|
case 5: // mouse speed
|
||||||
Cvar_Set(sensitivity, va("%f",
|
Cvar_SetValue(sensitivity, bound(1, sensitivity->value + dir, 25));
|
||||||
bound(1, sensitivity->value + dir, 25)));
|
|
||||||
break;
|
break;
|
||||||
case 6: // music volume
|
case 6: // music volume
|
||||||
Cvar_Set(bgmvolume, va("%f",
|
Cvar_SetValue(bgmvolume,
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
bound(0, bgmvolume->value + dir, 1)));
|
bound(0, bgmvolume->value + dir, 1));
|
||||||
#else
|
#else
|
||||||
bound(0, bgmvolume->value + (dir * 0.1), 1)));
|
bound(0, bgmvolume->value + (dir * 0.1), 1));
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 7: // sfx volume
|
case 7: // sfx volume
|
||||||
Cvar_Set(volume, va("%f", bound(0, volume->value + (dir * 0.1), 1)));
|
Cvar_SetValue(volume, bound(0, volume->value + (dir * 0.1), 1));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8: // allways run
|
case 8: // allways run
|
||||||
if (cl_forwardspeed->value > 200) {
|
if (cl_forwardspeed->value > 200) {
|
||||||
Cvar_Set(cl_forwardspeed, va("%d", 200));
|
Cvar_SetValue(cl_forwardspeed, 200);
|
||||||
Cvar_Set(cl_backspeed, va("%d", 200));
|
Cvar_SetValue(cl_backspeed, 200);
|
||||||
} else {
|
} else {
|
||||||
Cvar_Set(cl_forwardspeed, va("%d", 400));
|
Cvar_SetValue(cl_forwardspeed, 400);
|
||||||
Cvar_Set(cl_backspeed, va("%d", 400));
|
Cvar_SetValue(cl_backspeed, 400);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9: // invert mouse
|
case 9: // invert mouse
|
||||||
Cvar_Set(m_pitch, va("%f", -m_pitch->value));
|
Cvar_SetValue(m_pitch, -m_pitch->value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10: // lookspring
|
case 10: // lookspring
|
||||||
|
|
Loading…
Reference in a new issue