Don't request a highlight colour in games that don't need one

This means that Range, Singles, and Tracks can now use the default
background colour even if it's close to white.  In the case of Singles
I've left a dummy entry in the colour list so as not to renumber the
rest and break everyone's environment variables.  If Singles ever needs
a new colour it can re-use that slot.
This commit is contained in:
Ben Harris
2022-12-12 21:15:37 +00:00
parent 712abb7719
commit 562b29e102
3 changed files with 6 additions and 7 deletions

View File

@ -1624,7 +1624,6 @@ enum {
COL_USER = COL_GRID,
COL_ERROR,
COL_LOWLIGHT,
COL_HIGHLIGHT = COL_ERROR, /* mkhighlight needs it, I don't */
COL_CURSOR = COL_LOWLIGHT,
NCOLOURS
};
@ -1649,7 +1648,7 @@ static float *game_colours(frontend *fe, int *ncolours)
{
float *ret = snewn(3 * NCOLOURS, float);
game_mkhighlight(fe, ret, COL_BACKGROUND, COL_HIGHLIGHT, COL_LOWLIGHT);
game_mkhighlight(fe, ret, COL_BACKGROUND, -1, COL_LOWLIGHT);
COLOUR(ret, COL_GRID, 0.0F, 0.0F, 0.0F);
COLOUR(ret, COL_ERROR, 1.0F, 0.0F, 0.0F);