[gcompris] clockgame: the first levels now highlight the hour sectors to make them easier to recognize and to t



commit 2df532a5e7b5b1630a3567ce3ec7a8d6d3a1c487
Author: Angelo Naselli <anaselli linux it>
Date:   Wed Dec 28 02:14:08 2011 +0100

    clockgame: the first levels now highlight the hour sectors to make them easier to recognize and to teach.

 src/clockgame-activity/clockgame.c                 |   19 +++++++++++++++----
 .../resources/clockgame/Makefile.am                |    1 +
 .../resources/clockgame/clockgame-bg0.svgz         |  Bin 0 -> 8528 bytes
 3 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/src/clockgame-activity/clockgame.c b/src/clockgame-activity/clockgame.c
index 88394f9..c307177 100644
--- a/src/clockgame-activity/clockgame.c
+++ b/src/clockgame-activity/clockgame.c
@@ -145,7 +145,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
       gcomprisBoard=agcomprisBoard;
 
       gc_set_background(goo_canvas_get_root_item(gcomprisBoard->canvas),
-			      "clockgame/clockgame-bg.svgz");
+			      "clockgame/clockgame-bg0.svgz");
 
       /* set initial values for this level adjusted to
 	 fit the watch background */
@@ -154,7 +154,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
       clock_size = BOARDHEIGHT*0.3;
 
       gcomprisBoard->level=1;
-      gcomprisBoard->maxlevel=6;
+      gcomprisBoard->maxlevel=7;
       gcomprisBoard->sublevel=1;
       gcomprisBoard->number_of_sublevel=3; /* Go to next level after this number of 'play' */
       gc_score_start(SCORESTYLE_NOTE,
@@ -390,6 +390,17 @@ clockgame_create_item(GooCanvasItem *parent)
   gchar *mtext = NULL;
   gchar *font = NULL;
 
+  if(gcomprisBoard->level > 4)
+  {
+     gc_set_background(goo_canvas_get_root_item(gcomprisBoard->canvas),
+                       "clockgame/clockgame-bg.svgz");
+  }
+  else
+  {
+     gc_set_background(goo_canvas_get_root_item(gcomprisBoard->canvas),
+                       "clockgame/clockgame-bg0.svgz");
+  }
+
   boardRootItem = goo_canvas_group_new (goo_canvas_get_root_item(gcomprisBoard->canvas),
 					NULL);
 
@@ -430,7 +441,7 @@ clockgame_create_item(GooCanvasItem *parent)
 				      NULL);
 
       /* Display minute number */
-      if(gcomprisBoard->level<5)
+      if(gcomprisBoard->level<6)
 	{
 	  mtext = g_strdup_printf("%d", min);
 	  goo_canvas_text_new (boardRootItem,
@@ -446,7 +457,7 @@ clockgame_create_item(GooCanvasItem *parent)
 	}
 
       /* Display hour numbers */
-      if(gcomprisBoard->level<6)
+      if(gcomprisBoard->level<7)
 	if(min%5==0)
 	  {
 	    mtext = g_strdup_printf( "%d", min/5);
diff --git a/src/clockgame-activity/resources/clockgame/Makefile.am b/src/clockgame-activity/resources/clockgame/Makefile.am
index 174567a..674190e 100644
--- a/src/clockgame-activity/resources/clockgame/Makefile.am
+++ b/src/clockgame-activity/resources/clockgame/Makefile.am
@@ -1,5 +1,6 @@
 imgdir = $(pkgdatadir)/@PACKAGE_DATA_DIR@/clockgame
 img_DATA = \
+	clockgame-bg0.svgz \
 	clockgame-bg.svgz
 
 EXTRA_DIST = $(img_DATA)
diff --git a/src/clockgame-activity/resources/clockgame/clockgame-bg0.svgz b/src/clockgame-activity/resources/clockgame/clockgame-bg0.svgz
new file mode 100644
index 0000000..8be72a8
Binary files /dev/null and b/src/clockgame-activity/resources/clockgame/clockgame-bg0.svgz differ



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