Merge branch 'menu-highlight-non-default' into 'master'

Specially highlight menu settings which differ from the default value

See merge request KartKrew/Kart!1732
This commit is contained in:
Oni 2023-12-29 19:19:49 +00:00
commit 146cd745a7
2 changed files with 9 additions and 3 deletions

View file

@ -1184,7 +1184,7 @@ void M_HandleImageDef(INT32 choice);
// flags for text highlights
#define highlightflags V_AQUAMAP
#define recommendedflags V_GREENMAP
#define warningflags V_GRAYMAP
#define warningflags V_ORANGEMAP
// For some menu highlights
UINT16 M_GetCvPlayerColor(UINT8 pnum);

View file

@ -4248,10 +4248,11 @@ void M_DrawGenericOptions(void)
y += 16;
}
break;
default:
default: {
boolean isDefault = CV_IsSetToDefault(cv);
w = V_StringWidth(cv->string, 0);
V_DrawString(BASEVIDWIDTH - x - w, y,
((cv->flags & CV_CHEAT) && !CV_IsSetToDefault(cv) ? warningflags : highlightflags), cv->string);
(!isDefault ? warningflags : highlightflags), cv->string);
if (i == itemOn)
{
V_DrawCharacter(BASEVIDWIDTH - x - 10 - w - (skullAnimCounter/5), y,
@ -4259,7 +4260,12 @@ void M_DrawGenericOptions(void)
V_DrawCharacter(BASEVIDWIDTH - x + 2 + (skullAnimCounter/5), y,
'\x1D' | highlightflags, false); // right arrow
}
if (!isDefault)
{
V_DrawCharacter(BASEVIDWIDTH - x + (i == itemOn ? 13 : 5), y - 2, '.' | warningflags, false);
}
break;
}
}
break;
}