gcompris r3556 - in branches/gcomprixogoo/src: boards crane-activity gcompris paratrooper-activity railroad-activity
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3556 - in branches/gcomprixogoo/src: boards crane-activity gcompris paratrooper-activity railroad-activity
- Date: Tue, 30 Sep 2008 21:13:28 +0000 (UTC)
Author: bcoudoin
Date: Tue Sep 30 21:13:28 2008
New Revision: 3556
URL: http://svn.gnome.org/viewvc/gcompris?rev=3556&view=rev
Log:
fixed the bar to display the proper ratio when leaving an activity
that changed the ratio
Modified:
branches/gcomprixogoo/src/boards/menu2.c
branches/gcomprixogoo/src/crane-activity/crane.c
branches/gcomprixogoo/src/gcompris/bar.c
branches/gcomprixogoo/src/gcompris/gcompris.h
branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c
branches/gcomprixogoo/src/railroad-activity/railroad.c
Modified: branches/gcomprixogoo/src/boards/menu2.c
==============================================================================
--- branches/gcomprixogoo/src/boards/menu2.c (original)
+++ branches/gcomprixogoo/src/boards/menu2.c Tue Sep 30 21:13:28 2008
@@ -222,11 +222,11 @@
/* set initial values for this level */
gcomprisBoard->level = 1;
gcomprisBoard->maxlevel=1;
- gc_bar_set(GC_BAR_CONFIG|GC_BAR_ABOUT);
- gc_bar_set_level(gcomprisBoard);
/* Set back the bar to it's original location */
gc_bar_location (-1, -1, -1);
+ gc_bar_set(GC_BAR_CONFIG|GC_BAR_ABOUT);
+ gc_bar_set_level(gcomprisBoard);
menuitems = g_new(MenuItems, 1);
Modified: branches/gcomprixogoo/src/crane-activity/crane.c
==============================================================================
--- branches/gcomprixogoo/src/crane-activity/crane.c (original)
+++ branches/gcomprixogoo/src/crane-activity/crane.c Tue Sep 30 21:13:28 2008
@@ -205,7 +205,7 @@
gcomprisBoard->sublevel = 1;
gcomprisBoard->number_of_sublevel = 1; /* Go to next level after this number of 'play' */
gc_bar_set(GC_BAR_LEVEL);
- gc_bar_location (BOARDWIDTH-BARWIDTH/2-90, -1, 0.7);
+ gc_bar_location (BOARDWIDTH-200, -1, 0.9);
gc_set_background(goo_canvas_get_root_item(gcomprisBoard->canvas),
"crane/crane-bg.svgz");
Modified: branches/gcomprixogoo/src/gcompris/bar.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/bar.c (original)
+++ branches/gcomprixogoo/src/gcompris/bar.c Tue Sep 30 21:13:28 2008
@@ -90,11 +90,9 @@
g_slist_find_custom (buttons,
GUINT_TO_POINTER(flag),
(GCompareFunc) compare_flag);
- printf("get_item %d\n", flag);
if (!node)
return NULL;
- printf(" FOUND %p\n", node->data);
return (GooCanvasItem *)node->data;
}
@@ -128,7 +126,7 @@
0,
-15,
NULL);
- printf("new_button %d = %p\n", flag, item);
+
g_object_set (item,
"visibility", GOO_CANVAS_ITEM_INVISIBLE,
NULL);
@@ -154,14 +152,13 @@
{
GcomprisProperties *properties = gc_prop_get();
GdkPixbuf *pixmap = NULL;
- gint16 width, height;
+ gint16 height;
gint16 buttony;
double zoom;
- width = BARWIDTH;
height = BARHEIGHT-2;
- _default_x = width / 2;
+ _default_x = BOARDWIDTH/2;
_default_y = BOARDHEIGHT - BARHEIGHT;
_default_zoom = 1.0;
@@ -577,7 +574,6 @@
bar_reset_sound_id();
gc_sound_play_ogg ("sounds/bleep.wav", NULL);
- printf("flag=%d\n", flag);
switch (flag)
{
case GC_BAR_LEVEL:
Modified: branches/gcomprixogoo/src/gcompris/gcompris.h
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gcompris.h (original)
+++ branches/gcomprixogoo/src/gcompris/gcompris.h Tue Sep 30 21:13:28 2008
@@ -65,7 +65,6 @@
#define BOARDWIDTH 800
#define BOARDHEIGHT 520
#define BARHEIGHT 40
-#define BARWIDTH (BOARDWIDTH/2)
#define DEFAULT_SKIN "gartoon"
Modified: branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c
==============================================================================
--- branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c (original)
+++ branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c Tue Sep 30 21:13:28 2008
@@ -168,7 +168,7 @@
gcomprisBoard->level = 1;
gcomprisBoard->maxlevel = 6;
gc_bar_set(GC_BAR_LEVEL);
- gc_bar_location(BOARDWIDTH-BARWIDTH + 100, -1, 0.7);
+ gc_bar_location(BOARDWIDTH-200, -1, 0.9);
/* Init of paratrooper struct */
paratrooperItem.rootitem = NULL;
Modified: branches/gcomprixogoo/src/railroad-activity/railroad.c
==============================================================================
--- branches/gcomprixogoo/src/railroad-activity/railroad.c (original)
+++ branches/gcomprixogoo/src/railroad-activity/railroad.c Tue Sep 30 21:13:28 2008
@@ -187,7 +187,7 @@
} else {
gc_bar_set(GC_BAR_LEVEL|GC_BAR_REPEAT);
}
- gc_bar_location(BOARDWIDTH-BARWIDTH + 120, 0, 0.7);
+ gc_bar_location(BOARDWIDTH-200, 0, 0.7);
railroad_next_level();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]