From: Carl Worth Date: Thu, 5 Mar 2009 09:06:58 +0000 (-0800) Subject: Add visual indication of selected stack X-Git-Url: https://git.cworth.org/git?p=dvonn;a=commitdiff_plain;h=f484053e7018a5bff5b93fa36d9a2de5a873da35 Add visual indication of selected stack There's already logic for selecting only stacks that belong to the current player, and changing the current player after each move--- just no logic for doing anything with the move yet. --- diff --git a/dvonn.c b/dvonn.c index d4099d9..ebea5e6 100644 --- a/dvonn.c +++ b/dvonn.c @@ -287,6 +287,13 @@ on_expose_event_draw (GtkWidget *widget, cairo_set_source_rgba (cr, 0.0, 0.0, 0.2, 0.1); break; } + if (game->has_selected && + x == game->selected_x && + y == game->selected_y) + { + cairo_fill_preserve (cr); + cairo_set_source_rgba (cr, 0.2, 0.2, 1.0, 0.4); + } cairo_fill (cr); cairo_restore (cr);