chiark / gitweb /
tracks: Make error clue background white
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 30 Sep 2017 18:50:48 +0000 (19:50 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 30 Sep 2017 21:20:27 +0000 (22:20 +0100)
This makes them stand out more.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tracks.c

index 928ffc5905db30f798bd67963a992e9bae04205c..e4e7b5ca9c8e4611759c0fad6f538f7cf5fb28cc 100644 (file)
--- a/tracks.c
+++ b/tracks.c
@@ -2140,7 +2140,7 @@ enum {
     COL_GRID, COL_CLUE, COL_CURSOR,
     COL_TRACK, COL_TRACK_CLUE, COL_SLEEPER,
     COL_DRAGON, COL_DRAGOFF,
-    COL_ERROR, COL_FLASH,
+    COL_ERROR, COL_FLASH, COL_ERROR_BACKGROUND,
     NCOLOURS
 };
 
@@ -2157,6 +2157,7 @@ static float *game_colours(frontend *fe, int *ncolours)
         ret[COL_CLUE             * 3 + i] = 0.0F;
         ret[COL_GRID             * 3 + i] = 0.75F;
         ret[COL_CURSOR           * 3 + i] = 0.6F;
+        ret[COL_ERROR_BACKGROUND * 3 + i] = 1.0F;
     }
 
     ret[COL_SLEEPER * 3 + 0] = 0.5F;
@@ -2519,7 +2520,7 @@ static void game_redraw(drawing *dr, game_drawstate *ds, const game_state *oldst
             ds->num_errors[i] = state->num_errors[i];
             draw_clue(dr, ds, w, state->numbers->numbers[i], i,
                       ds->num_errors[i] ? COL_ERROR : COL_CLUE,
-                     COL_BACKGROUND);
+                     ds->num_errors[i] ? COL_ERROR_BACKGROUND : COL_BACKGROUND);
         }
     }