mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-18 01:51:39 +00:00
Fix drawing of final color
This commit is contained in:
parent
91fc3302cd
commit
2f1db66e78
1 changed files with 25 additions and 10 deletions
25
src/m_menu.c
25
src/m_menu.c
|
@ -12183,21 +12183,36 @@ colordraw:
|
||||||
{
|
{
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
if (skincolors[mc->color].accessible && !stoprow)
|
if (skincolors[mc->color].accessible)
|
||||||
{
|
{
|
||||||
M_DrawColorRamp(x + i*w, y + j*16, w, 1, skincolors[mc->color]);
|
M_DrawColorRamp(x + i*w, y + j*16, w, 1, skincolors[mc->color]);
|
||||||
if (mc->color == setupm_fakecolor->color) // store current color position
|
|
||||||
|
if (mc == setupm_fakecolor) // store current color position
|
||||||
{
|
{
|
||||||
cx = x + i*w;
|
cx = x + i*w;
|
||||||
cy = y + j*16;
|
cy = y + j*16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mc = mc->next;
|
|
||||||
while (!skincolors[mc->color].accessible && !stoprow) // Find accessible color after this one
|
if (stoprow)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find accessible color after this one
|
||||||
|
do
|
||||||
{
|
{
|
||||||
mc = mc->next;
|
mc = mc->next;
|
||||||
if (mc == menucolortail) stoprow = true;
|
if (mc == menucolortail)
|
||||||
|
{
|
||||||
|
stoprow = true;
|
||||||
}
|
}
|
||||||
|
} while (!skincolors[mc->color].accessible && !stoprow);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stoprow)
|
||||||
|
{
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue