M_DrawGenericOptions: highlight non-default cvar value in orange and display dot beside

This commit is contained in:
James R 2023-12-27 11:27:58 -08:00
parent 7d35c0db4b
commit cfc3b66707
2 changed files with 9 additions and 3 deletions

View file

@ -1179,7 +1179,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

@ -4190,10 +4190,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,
@ -4201,7 +4202,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;
}