mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 03:12:38 +00:00
Show values on (float) sliders in the options menu.
This commit is contained in:
parent
d9fde5c395
commit
08e63fc822
1 changed files with 10 additions and 8 deletions
18
src/m_menu.c
18
src/m_menu.c
|
@ -4062,14 +4062,6 @@ static void M_DrawSlider(INT32 x, INT32 y, const consvar_t *cv, boolean ontop)
|
|||
for (i = 1; i < SLIDER_RANGE; i++)
|
||||
V_DrawScaledPatch (x+i*8, y, 0,p);
|
||||
|
||||
if (ontop)
|
||||
{
|
||||
V_DrawCharacter(x - 6 - (skullAnimCounter/5), y,
|
||||
'\x1C' | V_YELLOWMAP, false);
|
||||
V_DrawCharacter(x+i*8 + 8 + (skullAnimCounter/5), y,
|
||||
'\x1D' | V_YELLOWMAP, false);
|
||||
}
|
||||
|
||||
p = W_CachePatchName("M_SLIDER", PU_PATCH);
|
||||
V_DrawScaledPatch(x+i*8, y, 0, p);
|
||||
|
||||
|
@ -4105,6 +4097,16 @@ static void M_DrawSlider(INT32 x, INT32 y, const consvar_t *cv, boolean ontop)
|
|||
range = 100;
|
||||
|
||||
V_DrawMappedPatch(x + 2 + (SLIDER_RANGE*8*range)/100, y, 0, p, yellowmap);
|
||||
|
||||
if (ontop)
|
||||
{
|
||||
V_DrawCharacter(x - 6 - (skullAnimCounter/5), y,
|
||||
'\x1C' | V_YELLOWMAP, false);
|
||||
V_DrawCharacter(x + 80 + (skullAnimCounter/5), y,
|
||||
'\x1D' | V_YELLOWMAP, false);
|
||||
V_DrawCenteredString(x + 40, y, V_30TRANS,
|
||||
(cv->flags & CV_FLOAT) ? va("%.2f", FIXED_TO_FLOAT(cv->value)) : va("%d", cv->value));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue