GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 45ae014f authored by Bruno Coudoin's avatar Bruno Coudoin

fixed paintings title and one more paintings. Clock redesign english sounds added

about box started
parent 07a30ddb
......@@ -7,6 +7,17 @@
* src/gcompris/config.c: added support for locale selection
* boards/locale*: removed locale selection by boards
* src/boards/locale.c: removed locale selection by boards
* src/boards/shapegame.c: added capability to edit a puzzle (click on a red point)
save is done with shift+click on any puzzle. The file
/tmp/gcompris-board.xml contains the edited board
* boards/paintings/kandinky.comp8: creation of this puzzle
* boards/paintings/board3_1.xml: creation of this puzzle. Make sure to click OK to see it
* boards/clockgame/clockgame-bg.jpg: creation of this new background by Renaud Blanchard.
* src/boards/clockgame.c: updated to fit in the new background
* boards/gcompris/misc/fishingboat.png: redrawed by Renaud
* src/boards/paratrooper.c: now, a click on the plane and the tux
* flies
2001-12-26 Bruno Coudoin <bruno.coudoin@free.fr>
* boards/missing_letter: added support for xmli18n
......
boards/boardicons/clockgame.png

6.63 KB | W: | H:

boards/boardicons/clockgame.png

7.44 KB | W: | H:

boards/boardicons/clockgame.png
boards/boardicons/clockgame.png
boards/boardicons/clockgame.png
boards/boardicons/clockgame.png
  • 2-up
  • Swipe
  • Onion skin
boards/gcompris/gcompris-about.jpg

8.46 KB | W: | H:

boards/gcompris/gcompris-about.jpg

8.24 KB | W: | H:

boards/gcompris/gcompris-about.jpg
boards/gcompris/gcompris-about.jpg
boards/gcompris/gcompris-about.jpg
boards/gcompris/gcompris-about.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -8,3 +8,4 @@ card.png taken from AisleRiot
By Pascal Geaoges:
phone_note.png
fishing_boat.png
boards/gcompris/misc/fishingboat.png

4.88 KB | W: | H:

boards/gcompris/misc/fishingboat.png

5.86 KB | W: | H:

boards/gcompris/misc/fishingboat.png
boards/gcompris/misc/fishingboat.png
boards/gcompris/misc/fishingboat.png
boards/gcompris/misc/fishingboat.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0"?>
<ShapeGame>
<Shape name="1" pixmapfile="gcompris/gcompris-shapelabel.jpg" type="SHAPE_BACKGROUND"
x="405" y="570" zoomx="1" zoomy="1" position="0"/>
<Title name="DEGAS Village The Dancing Class 1873" x="394" y="570" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="D" pixmapfile="paintings/level4/degas_class-dance_4.png" x="485" y="295" zoomx="1" zoomy="1" position="0"/>
<Shape name="A" pixmapfile="paintings/level4/degas_class-dance_1.png" x="320" y="130" zoomx="1" zoomy="1" position="0"/>
<Shape name="F" pixmapfile="paintings/level4/degas_class-dance_6.png" x="512" y="460" zoomx="1" zoomy="1" position="0"/>
<Shape name="C" pixmapfile="paintings/level4/degas_class-dance_3.png" x="292" y="275" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level4/degas_class-dance_2.png" x="513" y="128" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings/level4/degas_class-dance_5.png" x="319" y="440" zoomx="1" zoomy="1" position="0"/>
x="405" y="495" zoomx="1" zoomy="1" position="0"/>
<Title name="DEGAS Village The Dancing Class 1873" x="394" y="495" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="D" pixmapfile="paintings/level4/degas_class-dance_4.png" x="485" y="265" zoomx="1" zoomy="1" position="0"/>
<Shape name="A" pixmapfile="paintings/level4/degas_class-dance_1.png" x="320" y="100" zoomx="1" zoomy="1" position="0"/>
<Shape name="F" pixmapfile="paintings/level4/degas_class-dance_6.png" x="512" y="430" zoomx="1" zoomy="1" position="0"/>
<Shape name="C" pixmapfile="paintings/level4/degas_class-dance_3.png" x="292" y="245" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level4/degas_class-dance_2.png" x="513" y="98" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings/level4/degas_class-dance_5.png" x="319" y="410" zoomx="1" zoomy="1" position="0"/>
</ShapeGame>
<?xml version="1.0"?>
<ShapeGame>
<Shape name="1" pixmapfile="gcompris/gcompris-shapelabel.jpg" type="SHAPE_BACKGROUND"
x="405" y="570" zoomx="1" zoomy="1" position="0"/>
<Title name=" Pierre-Auguste RENOIR, Le Moulin de la Galette - 1876" x="394" y="570" justification="GTK_JUSTIFY_CENTER"/>
x="405" y="490" zoomx="1" zoomy="1" position="0"/>
<Title name=" Pierre-Auguste RENOIR, Le Moulin de la Galette - 1876" x="405" y="490" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="F" pixmapfile="paintings/level5/renoir-moulin_de_la_galette-6.png" x="599" y="360" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level5/renoir-moulin_de_la_galette-2.png" x="425" y="150" zoomx="1" zoomy="1" position="0"/>
<Shape name="A" pixmapfile="paintings/level5/renoir-moulin_de_la_galette-1.png" x="230" y="150" zoomx="1" zoomy="1" position="0"/>
......
<?xml version="1.0"?>
<ShapeGame>
<Shape name="1" pixmapfile="gcompris/gcompris-shapelabel.jpg" type="SHAPE_BACKGROUND"
x="405" y="570" zoomx="1" zoomy="1" position="0"/>
<Title name=" Pierre-Auguste RENOIR, Girls At The Piano - 1892" x="394" y="570" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="D" pixmapfile="paintings/level6/renoir-filles_piano-4.png" x="470" y="283" zoomx="1" zoomy="1" position="0"/>
<Shape name="A" pixmapfile="paintings/level6/renoir-filles_piano-1.png" x="330" y="120" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings/level6/renoir-filles_piano-5.png" x="329" y="427" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level6/renoir-filles_piano-2.png" x="488" y="120" zoomx="1" zoomy="1" position="0"/>
<Shape name="C" pixmapfile="paintings/level6/renoir-filles_piano-3.png" x="310" y="264" zoomx="1" zoomy="1" position="0"/>
<Shape name="F" pixmapfile="paintings/level6/renoir-filles_piano-6.png" x="489" y="444" zoomx="1" zoomy="1" position="0"/>
x="405" y="495" zoomx="1" zoomy="1" position="0"/>
<Title name=" Pierre-Auguste RENOIR, Girls At The Piano - 1892" x="405" y="495" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="A" pixmapfile="paintings/level6/renoir-filles_piano-1.png" x="322" y="69" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level6/renoir-filles_piano-2.png" x="478" y="69" zoomx="1" zoomy="1" position="0"/>
<Shape name="C" pixmapfile="paintings/level6/renoir-filles_piano-3.png" x="300" y="190" zoomx="1" zoomy="1" position="0"/>
<Shape name="D" pixmapfile="paintings/level6/renoir-filles_piano-4.png" x="456" y="189" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings/level6/renoir-filles_piano-5.png" x="323" y="311" zoomx="1" zoomy="1" position="0"/>
<Shape name="F" pixmapfile="paintings/level6/renoir-filles_piano-6.png" x="478" y="310" zoomx="1" zoomy="1" position="0"/>
<Shape name="G" pixmapfile="paintings/level6/renoir-filles_piano-7.png" x="323" y="417" zoomx="1" zoomy="1" position="0"/>
<Shape name="H" pixmapfile="paintings/level6/renoir-filles_piano-8.png" x="478" y="416" zoomx="1" zoomy="1" position="0"/>
</ShapeGame>
<?xml version="1.0"?>
<ShapeGame>
<Shape name="1" pixmapfile="gcompris/gcompris-shapelabel.jpg" type="SHAPE_BACKGROUND"
x="405" y="495" zoomx="1" zoomy="1" position="0"/>
<Title name="Kandinsky, Wassily, Composition VIII - 1923" x="405" y="485" justification="GTK_JUSTIFY_CENTER"/>
<Title name="Oil on canvas, 140 x 201 cm; Solomon R. Guggenheim Museum, New York" x="405" y="505" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="A" pixmapfile="paintings//kandinky.comp8/puzzle1.png" x="168" y="150" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings//kandinky.comp8/puzzle2.png" x="335" y="150" zoomx="1" zoomy="1" position="0"/>
<Shape name="C" pixmapfile="paintings//kandinky.comp8/puzzle3.png" x="502" y="122" zoomx="1" zoomy="1" position="0"/>
<Shape name="D" pixmapfile="paintings//kandinky.comp8/puzzle4.png" x="648" y="122" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings//kandinky.comp8/puzzle5.png" x="147" y="351" zoomx="1" zoomy="1" position="0"/>
<Shape name="F" pixmapfile="paintings//kandinky.comp8/puzzle6.png" x="315" y="351" zoomx="1" zoomy="1" position="0"/>
<Shape name="G" pixmapfile="paintings//kandinky.comp8/puzzle7.png" x="502" y="323" zoomx="1" zoomy="1" position="0"/>
<Shape name="H" pixmapfile="paintings//kandinky.comp8/puzzle8.png" x="648" y="323" zoomx="1" zoomy="1" position="0"/>
</ShapeGame>
<?xml version="1.0"?>
<ShapeGame>
<Shape name="1" pixmapfile="gcompris/gcompris-shapelabel.jpg" type="SHAPE_BACKGROUND"
x="405" y="570" zoomx="1" zoomy="1" position="0"/>
<Title name="BAZILLE The Ramparts at Aigues-Mortes 1867" x="403" y="570" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="F" pixmapfile="paintings/level1/bazille_rampart_6.jpg" x="606" y="381" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level1/bazille_rampart_2.jpg" x="403" y="200" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings/level1/bazille_rampart_5.jpg" x="403" y="381" zoomx="1" zoomy="1" position="0"/>
<Shape name="C" pixmapfile="paintings/level1/bazille_rampart_3.jpg" x="606" y="200" zoomx="1" zoomy="1" position="0"/>
<Shape name="A" pixmapfile="paintings/level1/bazille_rampart_1.jpg" x="200" y="200" zoomx="1" zoomy="1" position="0"/>
<Shape name="D" pixmapfile="paintings/level1/bazille_rampart_4.jpg" x="200" y="381" zoomx="1" zoomy="1" position="0"/>
x="405" y="460" zoomx="1" zoomy="1" position="0"/>
<Title name="BAZILLE The Ramparts at Aigues-Mortes 1867" x="405" y="460" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="F" pixmapfile="paintings/level1/bazille_rampart_6.jpg" x="606" y="331" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level1/bazille_rampart_2.jpg" x="403" y="150" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings/level1/bazille_rampart_5.jpg" x="403" y="331" zoomx="1" zoomy="1" position="0"/>
<Shape name="C" pixmapfile="paintings/level1/bazille_rampart_3.jpg" x="606" y="150" zoomx="1" zoomy="1" position="0"/>
<Shape name="A" pixmapfile="paintings/level1/bazille_rampart_1.jpg" x="200" y="150" zoomx="1" zoomy="1" position="0"/>
<Shape name="D" pixmapfile="paintings/level1/bazille_rampart_4.jpg" x="200" y="331" zoomx="1" zoomy="1" position="0"/>
</ShapeGame>
<?xml version="1.0"?>
<ShapeGame>
<Shape name="1" pixmapfile="gcompris/gcompris-shapelabel.jpg" type="SHAPE_BACKGROUND"
x="405" y="570" zoomx="1" zoomy="1" position="0"/>
<Title name="CASSAT Summertime 1895" x="394" y="570" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="C" pixmapfile="paintings/level2/cassat_summertime_3.jpg" x="593" y="200" zoomx="1" zoomy="1" position="0"/>
<Shape name="A" pixmapfile="paintings/level2/cassat_summertime_1.jpg" x="194" y="200" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings/level2/cassat_summertime_5.jpg" x="394" y="421" zoomx="1" zoomy="1" position="0"/>
<Shape name="F" pixmapfile="paintings/level2/cassat_summertime_6.jpg" x="593" y="421" zoomx="1" zoomy="1" position="0"/>
<Shape name="D" pixmapfile="paintings/level2/cassat_summertime_4.jpg" x="194" y="420" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level2/cassat_summertime_2.jpg" x="394" y="200" zoomx="1" zoomy="1" position="0"/>
x="395" y="490" zoomx="1" zoomy="1" position="0"/>
<Title name="CASSAT Summertime 1895" x="395" y="490" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="C" pixmapfile="paintings/level2/cassat_summertime_3.jpg" x="598" y="130" zoomx="1" zoomy="1" position="0"/>
<Shape name="A" pixmapfile="paintings/level2/cassat_summertime_1.jpg" x="199" y="130" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings/level2/cassat_summertime_5.jpg" x="399" y="351" zoomx="1" zoomy="1" position="0"/>
<Shape name="F" pixmapfile="paintings/level2/cassat_summertime_6.jpg" x="598" y="351" zoomx="1" zoomy="1" position="0"/>
<Shape name="D" pixmapfile="paintings/level2/cassat_summertime_4.jpg" x="199" y="350" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level2/cassat_summertime_2.jpg" x="399" y="130" zoomx="1" zoomy="1" position="0"/>
</ShapeGame>
<?xml version="1.0"?>
<ShapeGame>
<Shape name="1" pixmapfile="gcompris/gcompris-shapelabel.jpg" type="SHAPE_BACKGROUND"
x="405" y="570" zoomx="1" zoomy="1" position="0"/>
<Title name="VINCENT VAN GOGH Village Street in Auvers 1890" x="394" y="570" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="C" pixmapfile="paintings/level3/gogh_auvert_3.jpg" x="594" y="180" zoomx="1" zoomy="1" position="0"/>
<Shape name="D" pixmapfile="paintings/level3/gogh_auvert_4.jpg" x="194" y="405" zoomx="1" zoomy="1" position="0"/>
<Shape name="A" pixmapfile="paintings/level3/gogh_auvert_1.jpg" x="194" y="180" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings/level3/gogh_auvert_5.jpg" x="394" y="405" zoomx="1" zoomy="1" position="0"/>
<Shape name="F" pixmapfile="paintings/level3/gogh_auvert_6.jpg" x="594" y="405" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level3/gogh_auvert_2.jpg" x="394" y="180" zoomx="1" zoomy="1" position="0"/>
x="395" y="495" zoomx="1" zoomy="1" position="0"/>
<Title name="VINCENT VAN GOGH Village Street in Auvers 1890" x="395" y="495" justification="GTK_JUSTIFY_CENTER"/>
<Shape name="C" pixmapfile="paintings/level3/gogh_auvert_3.jpg" x="594" y="120" zoomx="1" zoomy="1" position="0"/>
<Shape name="D" pixmapfile="paintings/level3/gogh_auvert_4.jpg" x="194" y="355" zoomx="1" zoomy="1" position="0"/>
<Shape name="A" pixmapfile="paintings/level3/gogh_auvert_1.jpg" x="194" y="120" zoomx="1" zoomy="1" position="0"/>
<Shape name="E" pixmapfile="paintings/level3/gogh_auvert_5.jpg" x="394" y="355" zoomx="1" zoomy="1" position="0"/>
<Shape name="F" pixmapfile="paintings/level3/gogh_auvert_6.jpg" x="594" y="355" zoomx="1" zoomy="1" position="0"/>
<Shape name="B" pixmapfile="paintings/level3/gogh_auvert_2.jpg" x="394" y="120" zoomx="1" zoomy="1" position="0"/>
</ShapeGame>
......@@ -17,7 +17,8 @@ gcompris_SOURCES = \
pluginenum.c pluginenum.h board.h board.c \
bonus.c bonus.h \
score.c score.h \
config.c gcompris_config.h
config.c gcompris_config.h \
about.c about.h
gcompris_LDADD = \
$(GNOME_LIBDIR) $(GNOMEUI_LIBS) \
......
......@@ -141,7 +141,7 @@ INCLUDES = -I$(top_srcdir)/intl $(GNOME_INCLUDEDIR) $(GCONF_CFLAGS)
bin_PROGRAMS = gcompris
gcompris_SOURCES = pixbuf_util.c pixbuf_util.h gcompris.c gcompris.h gcompris-board.h properties.c properties.h gameutil.c gameutil.h bar.c help.c plugin.h pluginenum.c pluginenum.h board.h board.c bonus.c bonus.h score.c score.h config.c gcompris_config.h
gcompris_SOURCES = pixbuf_util.c pixbuf_util.h gcompris.c gcompris.h gcompris-board.h properties.c properties.h gameutil.c gameutil.h bar.c help.c plugin.h pluginenum.c pluginenum.h board.h board.c bonus.c bonus.h score.c score.h config.c gcompris_config.h about.c about.h
gcompris_LDADD = $(GNOME_LIBDIR) $(GNOMEUI_LIBS) $(GNOME_XML_LIB) $(INTLLIBS) $(GDK_PIXBUF_LIBS) $(GCONF_LIBS) $(GTKHTML_LIBS)
......@@ -160,7 +160,7 @@ LIBS = @LIBS@
gcompris_OBJECTS = pixbuf_util.$(OBJEXT) gcompris.$(OBJEXT) \
properties.$(OBJEXT) gameutil.$(OBJEXT) bar.$(OBJEXT) help.$(OBJEXT) \
pluginenum.$(OBJEXT) board.$(OBJEXT) bonus.$(OBJEXT) score.$(OBJEXT) \
config.$(OBJEXT)
config.$(OBJEXT) about.$(OBJEXT)
gcompris_DEPENDENCIES =
gcompris_LDFLAGS =
CFLAGS = @CFLAGS@
......@@ -175,9 +175,9 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
DEP_FILES = .deps/bar.P .deps/board.P .deps/bonus.P .deps/config.P \
.deps/gameutil.P .deps/gcompris.P .deps/help.P .deps/pixbuf_util.P \
.deps/pluginenum.P .deps/properties.P .deps/score.P
DEP_FILES = .deps/about.P .deps/bar.P .deps/board.P .deps/bonus.P \
.deps/config.P .deps/gameutil.P .deps/gcompris.P .deps/help.P \
.deps/pixbuf_util.P .deps/pluginenum.P .deps/properties.P .deps/score.P
SOURCES = $(gcompris_SOURCES)
OBJECTS = $(gcompris_OBJECTS)
......
/* gcompris - about.c
*
* Time-stamp: <2002/01/07 00:18:34 bruno>
*
* Copyright (C) 2000 Bruno Coudoin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
* Configuration of gcompris
*/
#include "gcompris.h"
#include "about.h"
static GnomeCanvasItem *rootitem = NULL;
static GnomeCanvasItem *plane_item = NULL;
static GdkPixbuf *pixmap_about = NULL;
static gint move_plane_id = 0;
static gint plane_x = 0;
static gint plane_y = 0;
static gint plane_speed = 0;
static gint item_event_ok(GnomeCanvasItem *item, GdkEvent *event, gpointer data);
static gint move_plane (GtkWidget *widget, gpointer item);
/*
* Do all the bar display and register the events
*/
void gcompris_about_start ()
{
GcomprisBoard *gcomprisBoard = get_current_gcompris_board();
GdkFont *gdk_font;
GdkFont *gdk_font_small;
GdkPixbuf *pixmap = NULL;
gint y_start = 0;
gint x_start = 0;
gint x_text_start = 0;
gint x_flag_start = 0;
gint y = 0;
GnomeCanvasItem *item;
/* Pause the board */
if(gcomprisBoard->plugin->pause_board != NULL)
gcomprisBoard->plugin->pause_board(TRUE);
if(rootitem)
return;
rootitem = \
gnome_canvas_item_new (gnome_canvas_root(gcompris_get_canvas()),
gnome_canvas_group_get_type (),
"x", (double)0,
"y", (double)0,
NULL);
pixmap = gcompris_load_pixmap("gcompris/help_bg.png");
y_start = (BOARDHEIGHT - gdk_pixbuf_get_height(pixmap))/2;
x_start = (BOARDWIDTH - gdk_pixbuf_get_width(pixmap))/2;
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap,
"x", (double) x_start,
"y", (double) y_start,
NULL);
y = BOARDHEIGHT - (BOARDHEIGHT - gdk_pixbuf_get_height(pixmap))/2;
gdk_pixbuf_unref(pixmap);
// TITLE
gdk_font = gdk_font_load ("-adobe-times-medium-r-normal--*-240-*-*-*-*-*-*");
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_text_get_type (),
"text", N_("About GCompris"),
"font_gdk", gdk_font,
"x", (double) BOARDWIDTH/2,
"y", (double) y_start + 40,
"anchor", GTK_ANCHOR_CENTER,
"fill_color", "white",
NULL);
// OK
pixmap = gcompris_load_pixmap("gcompris/buttons/button_small.png");
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap,
"x", (double) (BOARDWIDTH - gdk_pixbuf_get_width(pixmap))/2,
"y", (double) y - gdk_pixbuf_get_height(pixmap) - 10,
NULL);
gtk_signal_connect(GTK_OBJECT(item), "event",
(GtkSignalFunc) item_event_ok,
"ok");
gtk_signal_connect(GTK_OBJECT(item), "event",
(GtkSignalFunc) gcompris_item_event_focus,
NULL);
gdk_pixbuf_unref(pixmap);
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_text_get_type (),
"text", N_("OK"),
"font_gdk", gdk_font,
"x", (double) BOARDWIDTH/2,
"y", (double) y - gdk_pixbuf_get_height(pixmap) + 8,
"anchor", GTK_ANCHOR_CENTER,
"fill_color", "white",
NULL);
gtk_signal_connect(GTK_OBJECT(item), "event",
(GtkSignalFunc) item_event_ok,
"ok");
// About box content
gdk_font_small = gdk_font_load ("-adobe-times-medium-r-normal--*-180-*-*-*-*-*-*");
pixmap_about = gcompris_load_pixmap("gcompris/gcompris-about.png");
plane_x = gdk_pixbuf_get_width(pixmap_about)/2;
plane_y = gdk_pixbuf_get_height(pixmap_about)/2 + 40;
plane_speed = 1;
plane_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap_about,
"x", (double) plane_x,
"y", (double) plane_y,
NULL);
move_plane_id = gtk_timeout_add (500,
(GtkFunction) move_plane, NULL);
x_start += 150;
x_flag_start = x_start + 50;
x_text_start = x_start + 120;
}
void gcompris_about_stop ()
{
GcomprisBoard *gcomprisBoard = get_current_gcompris_board();
if (move_plane_id) {
gtk_timeout_remove (move_plane_id);
move_plane_id = 0;
}
// Destroy the help box
if(rootitem!=NULL)
{
gtk_object_destroy(GTK_OBJECT(rootitem));
gcomprisBoard->plugin->pause_board(FALSE);
}
rootitem = NULL;
gdk_pixbuf_unref(pixmap_about);
/* UnPause the board */
if(gcomprisBoard->plugin->pause_board != NULL)
gcomprisBoard->plugin->pause_board(FALSE);
}
/*-------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------*/
/*
* This does the moves of the game items on the play canvas
*
*/
static gint move_plane (GtkWidget *widget, gpointer data)
{
GcomprisBoard *gcomprisBoard = get_current_gcompris_board();
/* Manage the wrapping */
if(plane_x>gcomprisBoard->width) {
double x1, y1, x2, y2;
gnome_canvas_item_get_bounds (plane_item,
&x1,
&y1,
&x2,
&y2);
gnome_canvas_item_move(plane_item, (double)-gcomprisBoard->width-(x2-x1), (double)0);
plane_x = plane_x - gcomprisBoard->width - (x2-x1);
}
plane_x += plane_speed;
gnome_canvas_item_move(plane_item, plane_speed, 0);
/* Return true to be called again */
return(TRUE);
}
/* Callback for the OK operations */
static gint
item_event_ok(GnomeCanvasItem *item, GdkEvent *event, gpointer data)
{
switch (event->type)
{
case GDK_ENTER_NOTIFY:
break;
case GDK_LEAVE_NOTIFY:
break;
case GDK_BUTTON_PRESS:
if(!strcmp((char *)data, "ok"))
{
gcompris_about_stop();
}
default:
break;
}
return FALSE;
}
/* Local Variables: */
/* mode:c */
/* eval:(load-library "time-stamp") */
/* eval:(make-local-variable 'write-file-hooks) */
/* eval:(add-hook 'write-file-hooks 'time-stamp) */
/* eval:(setq time-stamp-format '(time-stamp-yyyy/mm/dd time-stamp-hh:mm:ss user-login-name)) */
/* End: */
/* GCompris -- about.h
*
* Time-stamp: <2001/12/26 23:13:29 bruno>
*
* Copyright (C) 2000 Bruno Coudoin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef GCOMPRISABOUT_H
#define GCOMPRISABOUT_H
void gcompris_about_start ();
void gcompris_about_stop ();
#endif
/* gcompris - bar.c
*
* Time-stamp: <2001/12/26 23:44:51 bruno>
* Time-stamp: <2002/01/06 23:02:07 bruno>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -40,6 +40,7 @@ static GnomeCanvasItem *ok_item = NULL;
static GnomeCanvasItem *help_item = NULL;
static GnomeCanvasItem *repeat_item = NULL;
static GnomeCanvasItem *config_item = NULL;
static GnomeCanvasItem *about_item = NULL;
static guint level_handler_id;
static gint sound_play_id = 0;
......@@ -155,10 +156,10 @@ void gcompris_bar_start (GnomeCanvas *theCanvas)
(GtkSignalFunc) gcompris_item_event_focus,
NULL);
// HELP
pixmap = gcompris_load_pixmap("gcompris/buttons/help.png");
// REPEAT
pixmap = gcompris_load_pixmap("gcompris/buttons/repeat.png");
zoom = (double)(height-BAR_GAP)/(double)gdk_pixbuf_get_height(pixmap);
help_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
repeat_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap,
"x", (double) width*0.5,
......@@ -170,17 +171,17 @@ void gcompris_bar_start (GnomeCanvas *theCanvas)
NULL);
gdk_pixbuf_unref(pixmap);
gtk_signal_connect(GTK_OBJECT(help_item), "event",
gtk_signal_connect(GTK_OBJECT(repeat_item), "event",
(GtkSignalFunc) item_event_bar,
"help");
gtk_signal_connect(GTK_OBJECT(help_item), "event",
"repeat");
gtk_signal_connect(GTK_OBJECT(repeat_item), "event",
(GtkSignalFunc) gcompris_item_event_focus,
NULL);
// REPEAT
pixmap = gcompris_load_pixmap("gcompris/buttons/repeat.png");
// HELP
pixmap = gcompris_load_pixmap("gcompris/buttons/help.png");
zoom = (double)(height-BAR_GAP)/(double)gdk_pixbuf_get_height(pixmap);
repeat_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
help_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap,
"x", (double) width*0.4,
......@@ -192,10 +193,10 @@ void gcompris_bar_start (GnomeCanvas *theCanvas)
NULL);
gdk_pixbuf_unref(pixmap);
gtk_signal_connect(GTK_OBJECT(repeat_item), "event",
gtk_signal_connect(GTK_OBJECT(help_item), "event",
(GtkSignalFunc) item_event_bar,
"repeat");
gtk_signal_connect(GTK_OBJECT(repeat_item), "event",
"help");
gtk_signal_connect(GTK_OBJECT(help_item), "event",
(GtkSignalFunc) gcompris_item_event_focus,
NULL);
......@@ -221,11 +222,35 @@ void gcompris_bar_start (GnomeCanvas *theCanvas)
(GtkSignalFunc) gcompris_item_event_focus,
NULL);
// ABOUT
pixmap = gcompris_load_pixmap("gcompris/buttons/about.png");
zoom = (double)(height-BAR_GAP)/(double)gdk_pixbuf_get_height(pixmap);
about_item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap,
"x", (double) width*0.2,
"y", (double) (height-gdk_pixbuf_get_height(pixmap)*zoom)/2,
"width", (double) gdk_pixbuf_get_width(pixmap),