[gcompris-devel] more images in the drawing activity

Bruno Coudoin bruno.coudoin at free.fr
Sun Oct 19 17:08:25 UTC 2003


I just commited a long standing half implemented feature in gcompris.
In the drawing activity, there is an image selector. I originaly did it
so I could put a category on the left. It's done now. 
Other activity can use it since the selector is in gcompris core.
You just need to create a file like this:

<?xml version="1.0" encoding="UTF-8"?>
<ImageSetRoot>
  <ImageSet filename="mrpatate/body.png">
    <Image filename="mrpatate/barbe12.png"/>
  </ImageSet>
</ImageSetRoot>

Then in your code define:
  static void image_selected(gchar *image)

Then a call to this will display the selector. once selected, the image
will be given to you through image_selected.
 gcompris_images_selector_start(gcomprisBoard, IMG_DATA_SET,
image_selected);

A future enhancement would be to add an entry <Assetml dataset=....> so
that the selector would display images out of an assetml query. This way
if more assetml packages are installed, the more shapes you will see in
gcompris and this dynamically.

As implemented, the list is fixed to 5 Set of 40 Images. Not too bad.

I tested on my kids, they really appreciate the new image set.

Bruno.






More information about the Gcompris-devel mailing list