Commit e438f4b4 authored by Bruno Coudoin's avatar Bruno Coudoin

-A- removed difficulty=0 cause it breaks the web site generation -A- -A-

	* boards/algebra_group.xml.in: -A- removed difficulty=0 cause it breaks the web site generation
	* boards/boards.xml.in: -A-
	* boards/colors_group.xml.in: -A-
	* boards/computer.xml.in: -A-
	* boards/experience.xml.in: -A-
	* boards/fun.xml.in: -A-
	* boards/menu.xml.in: -A-
	* boards/redraw_symmetrical.xml.in: fixed comments
	* boards/skins/pink/skin.xml: changed colors for erase
	* boards/wordsgame/wordslevel1.fr: New list of words from Catherine Lhomme
	* boards/wordsgame/wordslevel2.fr: New list of words from Catherine Lhomme
	* boards/wordsgame/wordslevelmax.fr: New list of words from Catherine Lhomme
	* gcompris.spec.in: added melody ogg files
	* src/boards/advanced_colors.c: (item_event): fixed bug: added pause while in bonus
	* src/boards/click_on_letter.c: (click_on_letter_create_item),
	(game_won), (process_ok_timeout), (process_ok), (item_event),
	(highlight_selected): fixed bug: added pause while in bonus
	* src/boards/colors.c: (item_event): fixed bug: added pause while in bonus
	* src/boards/imageid.c: (imageid_next_level), (item_event),
	(highlight_selected): fixed bug: added pause while in bonus
	* src/boards/leftright.c: (item_event): fixed bug: added pause while in bonus
	* src/boards/machpuzzle.c: (create_machine_item): changed hole color to black
	* src/boards/missingletter.c: (missing_letter_next_level),
	(missing_letter_create_item), (item_event), (highlight_selected),
	(add_xml_data): fixed bug: added pause while in bonus
	* src/boards/read_colors.c: (item_event): fixed bug: added pause while in bonus
	* src/boards/reading.c: (player_win), (player_loose),
	(item_event_valid): fixed bug: added pause while in bonus
	* src/gcompris/config.c: added Croatian
	* src/gcompris/score.c: (gcompris_score_set): centered score. use / instead of : for separator
parent 60bbe1c6
2004-02-02 Bruno coudoin <bruno.coudoin@free.fr>
* boards/algebra_group.xml.in: -A- removed difficulty=0 cause it breaks the web site generation
* boards/boards.xml.in: -A-
* boards/colors_group.xml.in: -A-
* boards/computer.xml.in: -A-
* boards/experience.xml.in: -A-
* boards/fun.xml.in: -A-
* boards/menu.xml.in: -A-
* boards/redraw_symmetrical.xml.in: fixed comments
* boards/skins/pink/skin.xml: changed colors for erase
* boards/wordsgame/wordslevel1.fr: New list of words from Catherine Lhomme
* boards/wordsgame/wordslevel2.fr: New list of words from Catherine Lhomme
* boards/wordsgame/wordslevelmax.fr: New list of words from Catherine Lhomme
* gcompris.spec.in: added melody ogg files
* src/boards/advanced_colors.c: (item_event): fixed bug: added pause while in bonus
* src/boards/click_on_letter.c: (click_on_letter_create_item),
(game_won), (process_ok_timeout), (process_ok), (item_event),
(highlight_selected): fixed bug: added pause while in bonus
* src/boards/colors.c: (item_event): fixed bug: added pause while in bonus
* src/boards/imageid.c: (imageid_next_level), (item_event),
(highlight_selected): fixed bug: added pause while in bonus
* src/boards/leftright.c: (item_event): fixed bug: added pause while in bonus
* src/boards/machpuzzle.c: (create_machine_item): changed hole color to black
* src/boards/missingletter.c: (missing_letter_next_level),
(missing_letter_create_item), (item_event), (highlight_selected),
(add_xml_data): fixed bug: added pause while in bonus
* src/boards/read_colors.c: (item_event): fixed bug: added pause while in bonus
* src/boards/reading.c: (player_win), (player_loose),
(item_event_valid): fixed bug: added pause while in bonus
* src/gcompris/config.c: added Croatian
* src/gcompris/score.c: (gcompris_score_set): centered score. use / instead of : for separator
2004-02-01 Robert Sedak <robert.sedak@sk.htnet.hr>
* configure.in: Added "hr" (Croatian) to ALL_LINGUAS.
2004-01-31 Bruno coudoin <bruno.coudoin@free.fr>
* Release 5.0
* src/boards/machpuzzle.c: (rectangle_in): Fixed hole detection.
2004-01-31 Bruno coudoin <bruno.coudoin@free.fr>
......@@ -30,24 +64,6 @@
* src/gcompris/bonus.c: (board_finished): now uses LOG_STATUS_COMPLETED when board_finished arrives.
* src/gcompris/gcompris.h: added GCOMPRIS_LOG_STATUS_COMPLETED
2004-01-30 Bruno coudoin <bruno.coudoin@free.fr>
reviewed by: <delete if not using a buddy>
* boards/Makefile.am:
* boards/billard.xml.in:
* boards/boardicons/billard.png:
* boards/images/billard_background.jpg:
* po/POTFILES.in:
* src/boards/machpuzzle.c: (start_board), (end_board), (set_level),
(is_our_board), (minigolf_next_level),
(minigolf_destroy_all_items), (minigolf_create_item), (game_won),
(create_machine_item), (rectangle_in), (minigolf_move):
* src/boards/python/gcompris/bonus/.cvsignore:
* src/boards/python/gcompris/sound/.cvsignore:
* src/gcompris/bonus.c: (board_finished):
* src/gcompris/gcompris.h:
2004-01-27 Bruno coudoin <bruno.coudoin@free.fr>
* src/boards/menu.c: (menu_create_item): fixed malformed printf regardings mandatory_sound_file
......
......@@ -4,7 +4,6 @@
name="algebra"
type="menu"
section="/algebra/algebra"
difficulty="0"
icon="boardicons/algebra_group.png"
author="">
<_title>Go to Algebra activities</_title>
......
......@@ -4,7 +4,6 @@
name="boards"
type="menu"
section="/boards"
difficulty="0"
icon="boardicons/boards.png"
author="">
<_title>Go to board based activities</_title>
......
......@@ -4,7 +4,6 @@
name="colors_group"
type="menu"
section="/fun/colors"
difficulty="0"
icon="boardicons/colors.png"
author="">
<_title>Go to colors activities</_title>
......
......@@ -4,7 +4,6 @@
name="computer"
type="menu"
section="/computer"
difficulty="0"
icon="boardicons/computer.png"
author="">
<_title>Discover the Computer</_title>
......
......@@ -4,7 +4,6 @@
name="experience"
type="menu"
section="/experience"
difficulty="0"
icon="boardicons/experience.png"
author="">
<_title>Go to experiences activities</_title>
......
......@@ -4,7 +4,6 @@
name="fun"
type="menu"
section="/fun"
difficulty="0"
icon="boardicons/fun.png"
author="">
<_title>Go to Amusement activities</_title>
......
......@@ -4,7 +4,6 @@
name="menu"
type="menu"
section="/"
difficulty="0"
icon=""
author="">
<_title>GCompris Main Menu</_title>
......
<?xml version="1.0" encoding="UTF-8"?>
<GCompris>
<Board
name="redraw"
name="redraw_symmetrical"
type="pythonboard"
section="/fun/."
mode="symmetrical"
......
......@@ -36,7 +36,7 @@
<!-- <color id="canal_lock/canal lock color h" rgba="0xf1ed1cFF"/>-->
<!-- <color id="canal_lock/ground color" rgba="0x9b5f5aFF"/>-->
<color id="erase/rectangle in" rgba="0xE0B0F000"/>
<color id="erase/rectangle in" rgba="0xE0B0F0CC"/>
<color id="erase/rectangle out" rgba="0Xef64d300"/>
<color id="erase/rectangle in2" rgba="0xeccff799"/>
<color id="erase/rectangle out2" rgba="0X0E0E0EFF"/>
......
ami
avec
bobi
canot
et
ferme
file
loto
moto
mule
nappe
nid
pie
rame
rire
rive
rue
sabot
sole
son
suit
tapis
auto
marmelade
mare
natte
tape
lape
tache
passe
tasse
venu
ville
vit
vite
vole
vu
marie
pot
mot
porte
mur
sur
attelé
farine
fumée
mère
passé
petite
posé
pré
père
ramassé
rivière
tissus
tué
valérie
vipère
vélo
étoffe
épine
maman
mené
olive
patte
petit
pomme
daniel
assis
peindre
joindre
craindre
prendre
coudre
valoir
bienvenue
blanche
douce
lourde
coquette
brève
vive
neuve
navire
arrive
sort
port
piano
violon
os
chatte
mer
loto
amie
copine
tortue
sorti
sourire
auto
assis
attelé
bienvenue
blanche
brève
coquette
coudre
craindre
daniel
douce
farine
fumée
joindre
lourde
maman
mené
mère
neuve
olive
passé
patte
peindre
petit
petite
pomme
posé
prendre
pré
père
ramassé
rivière
tissus
tué
valoir
valérie
vipère
vipère
vive
vélo
vélo
épine
épine
étoffe
étoffe
pic
roc
sac
choc
canne
carte
cape
colle
café
canard
carpe
cachalot
canari
pie
carré
cassé
écorché
cache
cuit
calé
copie
canot
colorie
......@@ -290,6 +290,7 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/share/gcompris/boards/s[cmu]*
%dir %{prefix}/share/gcompris/boards/sounds
%{prefix}/share/gcompris/boards/sounds/*.ogg
%{prefix}/share/gcompris/boards/sounds/melody/*.ogg
%{prefix}/share/gcompris/boards/sounds/HOWTO_ENCODE
%{prefix}/share/applications/*
%{prefix}/share/gnome/help/*
......
......@@ -378,16 +378,17 @@ static gint item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data) {
gnome_canvas_c2w (gcomprisBoard->canvas, x, y, &x, &y);
clicked = -1;
for (i=0; i<4; i++) {
for (j=0; j<2; j++) {
if (x>X[i*2] && x<X[i*2+1] && y>Y[j*2] && y<Y[j*2+1]) {
clicked = j*4 + i;
}
}
for (j=0; j<2; j++) {
if (x>X[i*2] && x<X[i*2+1] && y>Y[j*2] && y<Y[j*2+1]) {
clicked = j*4 + i;
}
}
}
if (clicked >= 0) {
highlight_selected(clicked);
gamewon = (clicked == GPOINTER_TO_INT(g_list_nth_data(listColors,0)));
ok();
board_paused = TRUE;
highlight_selected(clicked);
gamewon = (clicked == GPOINTER_TO_INT(g_list_nth_data(listColors,0)));
ok();
}
break;
......
......@@ -53,7 +53,6 @@ static GnomeCanvasGroup *boardRootItem = NULL;
static GnomeCanvasItem *phone_note_item = NULL;
static GnomeCanvasItem *l1_item = NULL, *l2_item = NULL, *l3_item = NULL, *l4_item = NULL;
static GdkPixbuf *l1_pixmap = NULL,*l2_pixmap = NULL,*l3_pixmap = NULL,*l4_pixmap = NULL;
static GnomeCanvasItem *button1 = NULL, *button2 = NULL, *button3 = NULL, *button4 = NULL, *selected_button = NULL;
static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent);
......@@ -270,7 +269,6 @@ static void click_on_letter_destroy_all_items()
static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent)
{
int xOffset,yOffset,i,j;
GdkFont *gdk_font;
GdkPixbuf *button_pixmap = NULL;
GdkPixbuf *phone_note_pixmap = NULL;
char *str[4];
......@@ -280,8 +278,6 @@ static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent)
char *str2 = NULL;
char *str3 = NULL;
gdk_font = gdk_font_load (gcompris_skin_font_board_big);
/* */
right_position = ((int)(((float)numberOfLetters)*rand()/(RAND_MAX+1.0))) +1;
assert(right_position >= 1 && right_position <= numberOfLetters);
......@@ -333,16 +329,7 @@ static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent)
"y", (double) 0,
NULL));
for (i=0; i<numberOfLetters; i++) {
str[i] =g_strdup_printf("gcompris/letters/%c.png", l[i]);
}
l1_pixmap = gcompris_load_pixmap(str[0]);
l2_pixmap = gcompris_load_pixmap(str[1]);
l3_pixmap = gcompris_load_pixmap(str[2]);
l4_pixmap = gcompris_load_pixmap(str[3]);
for (i=0; i<numberOfLetters; i++) {
g_free(str[i]);
str[i] =g_strdup_printf("%c", l[i]);
}
phone_note_pixmap = gcompris_load_pixmap("gcompris/misc/phone_note.png");
......@@ -367,10 +354,13 @@ static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent)
NULL);
l1_item = gnome_canvas_item_new (boardRootItem,
gnome_canvas_pixbuf_get_type (),
"pixbuf", l1_pixmap,
"x", (double) xOffset+(gdk_pixbuf_get_width(button_pixmap)-gdk_pixbuf_get_width(l1_pixmap))/2,
"y", (double) yOffset+(gdk_pixbuf_get_height(button_pixmap)-gdk_pixbuf_get_height(l1_pixmap))/2,
gnome_canvas_text_get_type (),
"text", str[0],
"font", gcompris_skin_font_board_huge_bold,
"anchor", GTK_ANCHOR_CENTER,
"fill_color_rgba", 0xefef43FF,
"x", (double) xOffset + gdk_pixbuf_get_width(button_pixmap)/2,
"y", (double) yOffset + gdk_pixbuf_get_height(button_pixmap)/2,
NULL);
xOffset +=HORIZONTAL_SEPARATION +gdk_pixbuf_get_width(button_pixmap);
......@@ -382,10 +372,13 @@ static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent)
"y", (double) yOffset,
NULL);
l2_item = gnome_canvas_item_new (boardRootItem,
gnome_canvas_pixbuf_get_type (),
"pixbuf", l2_pixmap,
"x", (double) xOffset+(gdk_pixbuf_get_width(button_pixmap)-gdk_pixbuf_get_width(l2_pixmap))/2,
"y", (double) yOffset+(gdk_pixbuf_get_height(button_pixmap)-gdk_pixbuf_get_height(l2_pixmap))/2,
gnome_canvas_text_get_type (),
"text", str[1],
"font", gcompris_skin_font_board_huge_bold,
"anchor", GTK_ANCHOR_CENTER,
"fill_color_rgba", 0xefef43FF,
"x", (double) xOffset + gdk_pixbuf_get_width(button_pixmap)/2,
"y", (double) yOffset + gdk_pixbuf_get_height(button_pixmap)/2,
NULL);
xOffset +=HORIZONTAL_SEPARATION +gdk_pixbuf_get_width(button_pixmap);
......@@ -397,10 +390,13 @@ static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent)
"y", (double) yOffset,
NULL);
l3_item = gnome_canvas_item_new (boardRootItem,
gnome_canvas_pixbuf_get_type (),
"pixbuf", l3_pixmap,
"x", (double) xOffset+(gdk_pixbuf_get_width(button_pixmap)-gdk_pixbuf_get_width(l3_pixmap))/2,
"y", (double) yOffset+(gdk_pixbuf_get_height(button_pixmap)-gdk_pixbuf_get_height(l3_pixmap))/2,
gnome_canvas_text_get_type (),
"text", str[2],
"font", gcompris_skin_font_board_huge_bold,
"anchor", GTK_ANCHOR_CENTER,
"fill_color_rgba", 0xefef43FF,
"x", (double) xOffset + gdk_pixbuf_get_width(button_pixmap)/2,
"y", (double) yOffset + gdk_pixbuf_get_height(button_pixmap)/2,
NULL);
xOffset +=HORIZONTAL_SEPARATION +gdk_pixbuf_get_width(button_pixmap);
......@@ -412,28 +408,32 @@ static GnomeCanvasItem *click_on_letter_create_item(GnomeCanvasGroup *parent)
"y", (double) yOffset,
NULL);
l4_item = gnome_canvas_item_new (boardRootItem,
gnome_canvas_pixbuf_get_type (),
"pixbuf", l4_pixmap,
"x", (double) xOffset+(gdk_pixbuf_get_width(button_pixmap)-gdk_pixbuf_get_width(l4_pixmap))/2,
"y", (double) yOffset+(gdk_pixbuf_get_height(button_pixmap)-gdk_pixbuf_get_height(l4_pixmap))/2,
gnome_canvas_text_get_type (),
"text", str[3],
"font", gcompris_skin_font_board_huge_bold,
"fill_color_rgba", 0xefef43FF,
"anchor", GTK_ANCHOR_CENTER,
"x", (double) xOffset + gdk_pixbuf_get_width(button_pixmap)/2,
"y", (double) yOffset + gdk_pixbuf_get_height(button_pixmap)/2,
NULL);
for (i=0; i<numberOfLetters; i++) {
g_free(str[i]);
}
gdk_pixbuf_unref(button_pixmap);
gdk_pixbuf_unref(phone_note_pixmap);
gdk_pixbuf_unref(l1_pixmap);
gdk_pixbuf_unref(l2_pixmap);
gdk_pixbuf_unref(l3_pixmap);
gdk_pixbuf_unref(l4_pixmap);
gtk_signal_connect(GTK_OBJECT(l1_item), "event", (GtkSignalFunc) item_event, NULL);
gtk_signal_connect(GTK_OBJECT(l2_item), "event", (GtkSignalFunc) item_event, NULL);
gtk_signal_connect(GTK_OBJECT(l3_item), "event", (GtkSignalFunc) item_event, NULL);
gtk_signal_connect(GTK_OBJECT(l4_item), "event", (GtkSignalFunc) item_event, NULL);
gtk_signal_connect(GTK_OBJECT(button1), "event", (GtkSignalFunc) item_event, NULL);
gtk_signal_connect(GTK_OBJECT(button2), "event", (GtkSignalFunc) item_event, NULL);
gtk_signal_connect(GTK_OBJECT(button3), "event", (GtkSignalFunc) item_event, NULL);
gtk_signal_connect(GTK_OBJECT(button4), "event", (GtkSignalFunc) item_event, NULL);
gtk_signal_connect(GTK_OBJECT(l1_item), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(1));
gtk_signal_connect(GTK_OBJECT(l2_item), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(2));
gtk_signal_connect(GTK_OBJECT(l3_item), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(3));
gtk_signal_connect(GTK_OBJECT(l4_item), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(4));
gtk_signal_connect(GTK_OBJECT(button1), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(1));
gtk_signal_connect(GTK_OBJECT(button2), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(2));
gtk_signal_connect(GTK_OBJECT(button3), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(3));
gtk_signal_connect(GTK_OBJECT(button4), "event", (GtkSignalFunc) item_event, GINT_TO_POINTER(4));
gtk_signal_connect(GTK_OBJECT(phone_note_item), "event", (GtkSignalFunc) phone_event, NULL);
return NULL;
}
......@@ -450,7 +450,6 @@ static void game_won()
board_finished(BOARD_FINISHED_TUXPLANE);
return;
}
gcompris_play_ogg ("bonus", NULL);
}
click_on_letter_next_level();
}
......@@ -458,11 +457,11 @@ static void game_won()
/* ==================================== */
static gboolean process_ok_timeout() {
gcompris_display_bonus(gamewon, BONUS_FLOWER);
return FALSE;
return FALSE;
}
static void process_ok() {
// leave time to display the right answer
// leave time to display the right answer
g_timeout_add(TIME_CLICK_TO_BONUS, process_ok_timeout, NULL);
}
/* ==================================== */
......@@ -481,8 +480,8 @@ static gint phone_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data) {
static gint
item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
{
int pos = GPOINTER_TO_INT(data);
double item_x, item_y;
GnomeCanvasItem * temp = NULL;
item_x = event->button.x;
item_y = event->button.y;
gnome_canvas_item_w2i(item->parent, &item_x, &item_y);
......@@ -493,35 +492,18 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
switch (event->type)
{
case GDK_BUTTON_PRESS:
temp = item;
if (item == l1_item)
temp = button1;
if (item == l2_item)
temp = button2;
if (item == l3_item )
temp = button3;
if (item == l4_item )
temp = button4;
assert( temp == button1 || temp == button2 || temp == button3 || temp == button4);
if ( ( temp == button1 && right_position == 1) ||
( temp == button2 && right_position == 2) ||
( temp == button3 && right_position == 3) ||
( temp == button4 && right_position == 4) ) {
/* We really don't want the user to change his/her mind */
board_paused = TRUE;
if ( pos == right_position ) {
gamewon = TRUE;
} else {
gamewon = FALSE;
}
highlight_selected(temp);
highlight_selected(item);
process_ok();
break;
case GDK_MOTION_NOTIFY:
break;
case GDK_BUTTON_RELEASE:
break;
default:
break;
}
......@@ -530,21 +512,31 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
/* ==================================== */
static void highlight_selected(GnomeCanvasItem * item) {
GdkPixbuf *button_pixmap_selected = NULL, *button_pixmap = NULL;
GnomeCanvasItem *button;
/* Replace text item by button item */
button = item;
if ( button == l1_item ) {
button = button1;
} else if ( item == l2_item ) {
button = button2;
} else if ( item == l3_item ) {
button = button3;
} else if ( item == l4_item ) {
button = button4;
}
assert( item == button1 || item == button2 || item == button3 || item == button4);
if (selected_button != NULL) {
if (selected_button != NULL && selected_button != button) {
button_pixmap = gcompris_load_skin_pixmap("button.png");
gnome_canvas_item_set(selected_button, "pixbuf", button_pixmap, NULL);
gdk_pixbuf_unref(button_pixmap);
}
if (selected_button != item) {
if (selected_button != button) {
button_pixmap_selected = gcompris_load_skin_pixmap("button_selected.png");
gnome_canvas_item_set(item, "pixbuf", button_pixmap_selected, NULL);
selected_button = item;
gnome_canvas_item_set(button, "pixbuf", button_pixmap_selected, NULL);
selected_button = button;
gdk_pixbuf_unref(button_pixmap_selected);
} else
selected_button = NULL;
}
}
......@@ -356,6 +356,7 @@ static gint item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data) {
clicked = 9;
if (clicked >= 0) {
board_paused = TRUE;
highlight_selected(clicked);
gamewon = (clicked == GPOINTER_TO_INT(g_list_nth_data(listColors,0)));
process_ok();
......
......@@ -94,7 +94,7 @@ static GnomeCanvasItem *image_item = NULL;
static GnomeCanvasItem *text1_item = NULL;
static GnomeCanvasItem *text2_item = NULL;
static GnomeCanvasItem *text3_item = NULL;
static GnomeCanvasItem *button1 = NULL, *button2 = NULL, *button3 = NULL;
static GnomeCanvasItem *button1 = NULL, *button2 = NULL, *button3 = NULL, *selected_button = NULL;
static GnomeCanvasItem *imageid_create_item(GnomeCanvasGroup *parent);
static void imageid_destroy_all_items(void);
......@@ -232,6 +232,7 @@ static void imageid_next_level()
gcompris_bar_set_level(gcomprisBoard);
imageid_destroy_all_items();
selected_button = NULL;
gamewon = FALSE;
gcompris_score_set(gcomprisBoard->sublevel);
......@@ -430,18 +431,20 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
switch (event->type)
{
case GDK_BUTTON_PRESS:
temp = item;
if (item == button1)
temp = text1_item;
if (item == button2)
temp = text2_item;
if (item == button3)
temp = text3_item;
assert(temp == button1 || temp == text1_item || temp == button2 || temp == text2_item || temp == button3 || temp == text3_item);
if ( ( temp == text1_item && right_word == 1) ||
( temp == text2_item && right_word == 2) ||
( temp == text3_item && right_word == 3) ) {
board_paused = TRUE;
temp = item;
if (item == text1_item)
temp = button1;
if (item == text2_item)
temp = button2;
if (item == text3_item)
temp = button3;
assert(temp == button1 || temp == button2 || temp == button3);
if ( ( temp == button1 && right_word == 1) ||
( temp == button2 && right_word == 2) ||
( temp == button3 && right_word == 3) ) {
gamewon = TRUE;
} else {
gamewon = FALSE;
......@@ -464,13 +467,35 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
/* ==================================== */
static void highlight_selected(GnomeCanvasItem * item) {
assert ( (item == text1_item) || (item == text2_item) || (item == text3_item));
gnome_canvas_item_set(text1_item, "fill_color", TEXT_COLOR, NULL);
gnome_canvas_item_set(text2_item, "fill_color", TEXT_COLOR, NULL);
gnome_canvas_item_set(text3_item, "fill_color", TEXT_COLOR, NULL);
gnome_canvas_item_set(item, "fill_color", "green", NULL);
GdkPixbuf *button_pixmap_selected = NULL, *button_pixmap = NULL;
GnomeCanvasItem *button;
/* Replace text item by button item */
button = item;
if ( button == text1_item ) {
button = button1;
} else if ( item == text2_item ) {
button = button2;
} else if ( item == text3_item ) {
button = button3;