gcompris r3485 - in branches/gcomprixogoo/src: clickgame-activity clockgame-activity erase-activity gcompris gletters-activity hanoi-activity hanoi_real-activity smallnumbers-activity sudoku-activity traffic-activity wordsgame-activity



Author: bcoudoin
Date: Tue Aug  5 23:22:44 2008
New Revision: 3485
URL: http://svn.gnome.org/viewvc/gcompris?rev=3485&view=rev

Log:
some board layout reorg to suit the new bar


Modified:
   branches/gcomprixogoo/src/clickgame-activity/clickgame.c
   branches/gcomprixogoo/src/clockgame-activity/clockgame.c
   branches/gcomprixogoo/src/erase-activity/erase.c
   branches/gcomprixogoo/src/gcompris/gcompris.h
   branches/gcomprixogoo/src/gletters-activity/gletters.c
   branches/gcomprixogoo/src/hanoi-activity/hanoi.c
   branches/gcomprixogoo/src/hanoi_real-activity/hanoi_real.c
   branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c
   branches/gcomprixogoo/src/sudoku-activity/sudoku.py
   branches/gcomprixogoo/src/traffic-activity/traffic.c
   branches/gcomprixogoo/src/wordsgame-activity/wordsgame.c

Modified: branches/gcomprixogoo/src/clickgame-activity/clickgame.c
==============================================================================
--- branches/gcomprixogoo/src/clickgame-activity/clickgame.c	(original)
+++ branches/gcomprixogoo/src/clickgame-activity/clickgame.c	Tue Aug  5 23:22:44 2008
@@ -364,8 +364,8 @@
   gcomprisBoard->maxlevel=6;
   gcomprisBoard->number_of_sublevel=10;
   gc_score_start(SCORESTYLE_NOTE,
-		 BOARDWIDTH - 220,
-		 BOARDHEIGHT - 50,
+		 BOARDWIDTH - 195,
+		 BOARDHEIGHT - 30,
 		 gcomprisBoard->number_of_sublevel);
   gc_bar_set(GC_BAR_LEVEL);
 

Modified: branches/gcomprixogoo/src/clockgame-activity/clockgame.c
==============================================================================
--- branches/gcomprixogoo/src/clockgame-activity/clockgame.c	(original)
+++ branches/gcomprixogoo/src/clockgame-activity/clockgame.c	Tue Aug  5 23:22:44 2008
@@ -161,7 +161,7 @@
       gcomprisBoard->number_of_sublevel=3; /* Go to next level after this number of 'play' */
       gc_score_start(SCORESTYLE_NOTE,
 			   BOARDWIDTH - 220,
-			   BOARDHEIGHT - 50,
+			   BOARDHEIGHT - 70,
 			   gcomprisBoard->number_of_sublevel);
       gc_bar_set(GC_BAR_LEVEL);
 

Modified: branches/gcomprixogoo/src/erase-activity/erase.c
==============================================================================
--- branches/gcomprixogoo/src/erase-activity/erase.c	(original)
+++ branches/gcomprixogoo/src/erase-activity/erase.c	Tue Aug  5 23:22:44 2008
@@ -353,7 +353,7 @@
 {
   int current_layer = get_num_layers();
   double w = (BOARDWIDTH/number_of_item_x) ;
-  double h = (BOARDHEIGHT/number_of_item_y) ;
+  double h = ((BOARDHEIGHT-BARHEIGHT)/number_of_item_y) ;
   int item_x = i / w;
   int item_y = j / h;
   i = item_x * w;
@@ -418,7 +418,7 @@
   assert(number_of_items == 0);
 
   for(i=0; i<BOARDWIDTH; i+=BOARDWIDTH/number_of_item_x)
-    for(j=0; j<BOARDHEIGHT; j+=BOARDHEIGHT/number_of_item_y)
+    for(j=0; j<(BOARDHEIGHT-BARHEIGHT); j+=(BOARDHEIGHT-BARHEIGHT)/number_of_item_y)
       add_one_item(i, j, 0);
 
   return NULL;
@@ -464,7 +464,7 @@
   goo_canvas_convert_from_item_space(goo_canvas_item_get_canvas(item),
 				     item, &screen_x, &screen_y);
   x = screen_x / (BOARDWIDTH/number_of_item_x);
-  y = screen_y / (BOARDHEIGHT/number_of_item_y);
+  y = screen_y / ((BOARDHEIGHT-BARHEIGHT)/number_of_item_y);
 
   if (items_per_cell)
     items_per_cell[(int) (x * number_of_item_x + y)]--;
@@ -547,7 +547,7 @@
       int x = event->x;
       int y = event->y;
       int item_x = x / (BOARDWIDTH/number_of_item_x);
-      int item_y = y / (BOARDHEIGHT/number_of_item_y);
+      int item_y = y / ((BOARDHEIGHT-BARHEIGHT)/number_of_item_y);
 
       if (items_per_cell[item_x * number_of_item_x + item_y] == 0)
 	add_one_item(x, y, 1);

Modified: branches/gcomprixogoo/src/gcompris/gcompris.h
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gcompris.h	(original)
+++ branches/gcomprixogoo/src/gcompris/gcompris.h	Tue Aug  5 23:22:44 2008
@@ -64,7 +64,7 @@
 
 #define BOARDWIDTH  800
 #define BOARDHEIGHT 520
-#define BARHEIGHT   80
+#define BARHEIGHT   40
 
 #define DEFAULT_SKIN "gartoon"
 

Modified: branches/gcomprixogoo/src/gletters-activity/gletters.c
==============================================================================
--- branches/gcomprixogoo/src/gletters-activity/gletters.c	(original)
+++ branches/gcomprixogoo/src/gletters-activity/gletters.c	Tue Aug  5 23:22:44 2008
@@ -171,8 +171,8 @@
   gcomprisBoard->number_of_sublevel = (DEFAULT_SUBLEVEL>l?DEFAULT_SUBLEVEL:l);
 
   gc_score_start(SCORESTYLE_NOTE,
-		       BOARDWIDTH - 220,
-		       BOARDHEIGHT - 50,
+		       BOARDWIDTH - 195,
+		       BOARDHEIGHT - 30,
 		       gcomprisBoard->number_of_sublevel);
   gc_bar_set(GC_BAR_CONFIG|GC_BAR_LEVEL);
 }

Modified: branches/gcomprixogoo/src/hanoi-activity/hanoi.c
==============================================================================
--- branches/gcomprixogoo/src/hanoi-activity/hanoi.c	(original)
+++ branches/gcomprixogoo/src/hanoi-activity/hanoi.c	Tue Aug  5 23:22:44 2008
@@ -325,7 +325,7 @@
     item = goo_canvas_image_new (boardRootItem,
 				 pixmap,
 				 10,
-				 BOARDHEIGHT - 60,
+				 BOARDHEIGHT - 80,
 				 NULL);
     goo_canvas_item_scale(item,
 			  (double)(BOARDWIDTH-20)/gdk_pixbuf_get_width(pixmap),
@@ -336,7 +336,7 @@
   goo_canvas_text_new (boardRootItem,
 		       _("Build the same tower in the empty area as the one you see on the right-hand side."),
 		       (double) BOARDWIDTH/2 +1,
-		       (double) BOARDHEIGHT - 50 +1,
+		       (double) BOARDHEIGHT - 70 +1,
 		       -1,
 		       GTK_ANCHOR_NORTH,
 		       "font", gc_skin_font_board_medium,
@@ -346,7 +346,7 @@
   goo_canvas_text_new (boardRootItem,
 		       _("Build the same tower in the empty area as the one you see on the right-hand side."),
 		       (double) BOARDWIDTH/2,
-		       (double) BOARDHEIGHT - 50,
+		       (double) BOARDHEIGHT - 70,
 		       -1,
 		       GTK_ANCHOR_NORTH,
 		       "font", gc_skin_font_board_medium,

Modified: branches/gcomprixogoo/src/hanoi_real-activity/hanoi_real.c
==============================================================================
--- branches/gcomprixogoo/src/hanoi_real-activity/hanoi_real.c	(original)
+++ branches/gcomprixogoo/src/hanoi_real-activity/hanoi_real.c	Tue Aug  5 23:22:44 2008
@@ -265,7 +265,7 @@
     item = goo_canvas_image_new (boardRootItem,
 				 pixmap,
 				 10,
-				 BOARDHEIGHT - 60,
+				 BOARDHEIGHT - 110,
 				 NULL);
     goo_canvas_item_scale(item,
 			  (double)(BOARDWIDTH - 20)/gdk_pixbuf_get_width(pixmap),
@@ -275,19 +275,8 @@
 
   goo_canvas_text_new (boardRootItem,
 		       _("Move the entire stack to the right peg, one disc at a time"),
-		       BOARDWIDTH/2 +1,
-		       BOARDHEIGHT - 50 +1,
-		       -1,
-		       GTK_ANCHOR_NORTH,
-		       "font", gc_skin_font_board_medium,
-		       "fill_color_rgba", gc_skin_color_shadow,
-		       "alignment", PANGO_ALIGN_CENTER,
-		       NULL);
-
-  goo_canvas_text_new (boardRootItem,
-		       _("Move the entire stack to the right peg, one disc at a time"),
 		       BOARDWIDTH/2,
-		       BOARDHEIGHT - 50,
+		       BOARDHEIGHT - 100,
 		       -1,
 		       GTK_ANCHOR_NORTH,
 		       "font", gc_skin_font_board_medium,

Modified: branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c
==============================================================================
--- branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c	(original)
+++ branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c	Tue Aug  5 23:22:44 2008
@@ -163,8 +163,8 @@
       gcomprisBoard->maxlevel = 9;
       gcomprisBoard->number_of_sublevel=10;
       gc_score_start(SCORESTYLE_NOTE,
-			   BOARDWIDTH - 220,
-			   BOARDHEIGHT - 50,
+			   BOARDWIDTH - 195,
+			   BOARDHEIGHT - 30,
 			   gcomprisBoard->number_of_sublevel);
       gc_bar_set(GC_BAR_CONFIG|GC_BAR_LEVEL);
 

Modified: branches/gcomprixogoo/src/sudoku-activity/sudoku.py
==============================================================================
--- branches/gcomprixogoo/src/sudoku-activity/sudoku.py	(original)
+++ branches/gcomprixogoo/src/sudoku-activity/sudoku.py	Tue Aug  5 23:22:44 2008
@@ -520,10 +520,10 @@
     if(self.sudo_region.has_key(self.sudo_size)):
       region = self.sudo_region[self.sudo_size]
 
-    square_width = (gcompris.BOARD_HEIGHT-50) / self.sudo_size
+    square_width = (gcompris.BOARD_HEIGHT-80) / self.sudo_size
     square_height = square_width
     x_init = (gcompris.BOARD_WIDTH - square_width*self.sudo_size)/2 - 40
-    y_init = (gcompris.BOARD_HEIGHT - square_height*self.sudo_size)/2
+    y_init = (gcompris.BOARD_HEIGHT - 45 - square_height*self.sudo_size)/2
 
     for x in range(0,self.sudo_size):
       line_square = []

Modified: branches/gcomprixogoo/src/traffic-activity/traffic.c
==============================================================================
--- branches/gcomprixogoo/src/traffic-activity/traffic.c	(original)
+++ branches/gcomprixogoo/src/traffic-activity/traffic.c	Tue Aug  5 23:22:44 2008
@@ -166,7 +166,7 @@
       gcomprisBoard->number_of_sublevel=5; /* Go to next level after this number of 'play' */
       gc_score_start(SCORESTYLE_NOTE,
 			   BOARDWIDTH - 220,
-			   BOARDHEIGHT - 50,
+			   BOARDHEIGHT - 70,
 			   gcomprisBoard->number_of_sublevel);
 
       str = gc_skin_image_get("button_reload.png");

Modified: branches/gcomprixogoo/src/wordsgame-activity/wordsgame.c
==============================================================================
--- branches/gcomprixogoo/src/wordsgame-activity/wordsgame.c	(original)
+++ branches/gcomprixogoo/src/wordsgame-activity/wordsgame.c	Tue Aug  5 23:22:44 2008
@@ -426,8 +426,8 @@
   gcomprisBoard->number_of_sublevel = 10 +
     ((gcomprisBoard->level-1) * 5);
   gc_score_start(SCORESTYLE_NOTE,
-		 BOARDWIDTH - 220,
-		 BOARDHEIGHT - 50,
+		 BOARDWIDTH - 195,
+		 BOARDHEIGHT - 30,
 		 gcomprisBoard->number_of_sublevel);
 
   gc_bar_set_level(gcomprisBoard);



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