Commit b48a496c authored by Bruno Coudoin's avatar Bruno Coudoin

fixed the bar to display the proper ratio when leaving an activity

that changed the ratio

svn path=/branches/gcomprixogoo/; revision=3556
parent f232ce54
......@@ -222,11 +222,11 @@ static void menu_start (GcomprisBoard *agcomprisBoard)
/* 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);
......
......@@ -205,7 +205,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
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");
......
......@@ -90,11 +90,9 @@ get_item(GComprisBarFlags flag)
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 @@ new_button(GooCanvasItem *rootitem,
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 @@ void gc_bar_start (GooCanvas *theCanvas)
{
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 @@ item_event_bar (GooCanvasItem *item,
bar_reset_sound_id();
gc_sound_play_ogg ("sounds/bleep.wav", NULL);
printf("flag=%d\n", flag);
switch (flag)
{
case GC_BAR_LEVEL:
......
......@@ -65,7 +65,6 @@
#define BOARDWIDTH 800
#define BOARDHEIGHT 520
#define BARHEIGHT 40
#define BARWIDTH (BOARDWIDTH/2)
#define DEFAULT_SKIN "gartoon"
......
......@@ -168,7 +168,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
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;
......
......@@ -187,7 +187,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
} 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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment