Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/boards
diff options
context:
space:
mode:
authorBruno Coudoin <bcoudoin@src.gnome.org>2008-09-01 22:15:50 (GMT)
committer Bruno Coudoin <bcoudoin@src.gnome.org>2008-09-01 22:15:50 (GMT)
commit5d179e0a09a21041acc197d360882c3ba632727d (patch)
tree92a7b713a2053e05471cf6e0fd92bc3038641def /src/boards
parent6b592765c73e3c01575634de14d292e0a4574ce2 (diff)
Now when the level is won the red point are hidden to let the children
appreciate the art work. svn path=/trunk/; revision=3524
Diffstat (limited to 'src/boards')
-rw-r--r--src/boards/shapegame.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/boards/shapegame.c b/src/boards/shapegame.c
index 8ee8c50..d5c9d11 100644
--- a/src/boards/shapegame.c
+++ b/src/boards/shapegame.c
@@ -146,6 +146,7 @@ static void dump_shape(Shape *shape);
#endif
static void update_shapelist_item(void);
static void auto_process(void);
+static void target_point_hide();
static gint drag_mode;
/* Description of this plugin */
@@ -477,6 +478,7 @@ static void process_ok()
if(done)
{
+ target_point_hide();
gamewon = TRUE;
gc_bonus_display(gamewon, GC_BONUS_FLOWER);
}
@@ -891,6 +893,7 @@ static Shape * item_to_shape(GnomeCanvasItem *item)
/* switch off all point, and switch on this point
if shape is NULL, switch off all */
+static
void target_point_switch_on(Shape *shape_on)
{
GList *list;
@@ -907,6 +910,21 @@ void target_point_switch_on(Shape *shape_on)
}
}
+/* hide all point to let the user look the real image at the end */
+static
+void target_point_hide()
+{
+ GList *list;
+ Shape *shape;
+
+ for(list = shape_list; list ; list = list ->next)
+ {
+ shape = list -> data;
+ if(shape->type == SHAPE_TARGET && ! shape->targetfile)
+ gnome_canvas_item_hide(shape->target_point);
+ }
+}
+
static gint item_event_drag(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
{
static GnomeCanvasItem *shadow_item=NULL;