gcompris r3524 - trunk/src/boards



Author: bcoudoin
Date: Mon Sep  1 22:15:50 2008
New Revision: 3524
URL: http://svn.gnome.org/viewvc/gcompris?rev=3524&view=rev

Log:
	Now when the level is won the red point are hidden to let the children
	appreciate the art work.


Modified:
   trunk/src/boards/shapegame.c

Modified: trunk/src/boards/shapegame.c
==============================================================================
--- trunk/src/boards/shapegame.c	(original)
+++ trunk/src/boards/shapegame.c	Mon Sep  1 22:15:50 2008
@@ -146,6 +146,7 @@
 #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 @@
 
   if(done)
     {
+      target_point_hide();
       gamewon = TRUE;
       gc_bonus_display(gamewon, GC_BONUS_FLOWER);
     }
@@ -891,6 +893,7 @@
 
 /* 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 @@
     }
 }
 
+/* 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]