mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 10:02:01 +00:00
PLAY_MP_OptSelectDef: Adjust the unwinding boxes
- Make them open in a snappier fashion, not a leisurely step - Fix the open box missing an entire row of pixels at the top
This commit is contained in:
parent
39dadf1b1e
commit
0305249a36
2 changed files with 22 additions and 8 deletions
|
|
@ -2364,11 +2364,11 @@ static void M_MPOptDrawer(menu_t *m, INT16 extend[3][3])
|
|||
|
||||
if (extend[i][2])
|
||||
{
|
||||
for (j=0; j < extend[i][2]/2; j++)
|
||||
for (j=0; j <= extend[i][2]/2; j++)
|
||||
{
|
||||
// Draw rectangles that look like the current selected item starting from the top of the actual selection graphic and going up to where it's supposed to go.
|
||||
// With colour 169 (that's the index of the shade of black the plague colourization gives us. ...No I don't like using a magic number either.
|
||||
V_DrawFill(x + (extend[i][2]/2) - j - (buttback->width/2), (y + extend[i][2]) - (2*j), 225, 2, 169);
|
||||
V_DrawFill((x-1) + (extend[i][2]/2) - j - (buttback->width/2), (y + extend[i][2]) - (2*j), 226, 2, 169);
|
||||
}
|
||||
}
|
||||
V_DrawFixedPatch((x + (extend[i][2]/2)) *FRACUNIT, (y + extend[i][2])*FRACUNIT, FRACUNIT, 0, buttback, colormap);
|
||||
|
|
|
|||
|
|
@ -71,12 +71,26 @@ void M_MPOptSelectTick(void)
|
|||
// 3 Because we have 3 options in the menu
|
||||
for (; i < 3; i++)
|
||||
{
|
||||
if (mpmenu.modewinextend[i][0])
|
||||
mpmenu.modewinextend[i][2] += 8;
|
||||
if (mpmenu.modewinextend[i][0] != 0)
|
||||
{
|
||||
if (mpmenu.modewinextend[i][2] < (mpmenu.modewinextend[i][1] - 8))
|
||||
{
|
||||
mpmenu.modewinextend[i][2] = (((2*mpmenu.modewinextend[i][1]) + mpmenu.modewinextend[i][2])/3);
|
||||
mpmenu.modewinextend[i][2] -= (mpmenu.modewinextend[i][2] & 1); // prevent jitter, bias closed
|
||||
}
|
||||
else
|
||||
{
|
||||
mpmenu.modewinextend[i][2] = mpmenu.modewinextend[i][1];
|
||||
}
|
||||
}
|
||||
else if (mpmenu.modewinextend[i][2] > 8)
|
||||
{
|
||||
mpmenu.modewinextend[i][2] /= 3;
|
||||
mpmenu.modewinextend[i][2] += (mpmenu.modewinextend[i][2] & 1); // prevent jitter, bias open
|
||||
}
|
||||
else
|
||||
mpmenu.modewinextend[i][2] -= 8;
|
||||
|
||||
mpmenu.modewinextend[i][2] = min(mpmenu.modewinextend[i][1], max(0, mpmenu.modewinextend[i][2]));
|
||||
//CONS_Printf("%d - %d,%d,%d\n", i, mpmenu.modewinextend[i][0], mpmenu.modewinextend[i][1], mpmenu.modewinextend[i][2]);
|
||||
{
|
||||
mpmenu.modewinextend[i][2] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue