diff options
| author | Jonas Kölker <jonaskoelker@yahoo.com> | 2015-10-01 21:59:30 +0200 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2015-10-03 17:12:20 +0100 |
| commit | 6482ed0e3c886afd6b44acf91450524ff70d102c (patch) | |
| tree | 39504273b2ea52e0e1614fd025245c05a3329d44 | |
| parent | b9dfef7a12a6ce813f30f1cc755ed3bb21945dcc (diff) | |
| download | puzzles-6482ed0e3c886afd6b44acf91450524ff70d102c.zip puzzles-6482ed0e3c886afd6b44acf91450524ff70d102c.tar.gz puzzles-6482ed0e3c886afd6b44acf91450524ff70d102c.tar.bz2 puzzles-6482ed0e3c886afd6b44acf91450524ff70d102c.tar.xz | |
Fix a display glitch in Keen's pencil-mode cursor.
Draw pencil-mode cursor before corners of thick lines in order to make
the thick lines appear on top of the north-west corner of the pencil
cursor, just like they do with the non-pencil cursor.
| -rw-r--r-- | keen.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -1790,6 +1790,18 @@ static void draw_tile(drawing *dr, game_drawstate *ds, struct clues *clues, draw_rect(dr, cx, cy, cw, ch, (tile & DF_HIGHLIGHT) ? COL_HIGHLIGHT : COL_BACKGROUND); + /* pencil-mode highlight */ + if (tile & DF_HIGHLIGHT_PENCIL) { + int coords[6]; + coords[0] = cx; + coords[1] = cy; + coords[2] = cx+cw/2; + coords[3] = cy; + coords[4] = cx; + coords[5] = cy+ch/2; + draw_polygon(dr, coords, 3, COL_HIGHLIGHT, COL_HIGHLIGHT); + } + /* * Draw the corners of thick lines in corner-adjacent squares, * which jut into this square by one pixel. @@ -1803,18 +1815,6 @@ static void draw_tile(drawing *dr, game_drawstate *ds, struct clues *clues, if (x+1 < w && y+1 < w && dsf_canonify(clues->dsf, y*w+x) != dsf_canonify(clues->dsf, (y+1)*w+x+1)) draw_rect(dr, tx+TILESIZE-1-2*GRIDEXTRA, ty+TILESIZE-1-2*GRIDEXTRA, GRIDEXTRA, GRIDEXTRA, COL_GRID); - /* pencil-mode highlight */ - if (tile & DF_HIGHLIGHT_PENCIL) { - int coords[6]; - coords[0] = cx; - coords[1] = cy; - coords[2] = cx+cw/2; - coords[3] = cy; - coords[4] = cx; - coords[5] = cy+ch/2; - draw_polygon(dr, coords, 3, COL_HIGHLIGHT, COL_HIGHLIGHT); - } - /* Draw the box clue. */ if (dsf_canonify(clues->dsf, y*w+x) == y*w+x) { long clue = clues->clues[y*w+x]; |