Commit 6f349246 authored by Bruno Coudoin's avatar Bruno Coudoin

completed followline activity

fixed wordsgame to point to readingh for word files

svn path=/branches/gcomprixo/; revision=2854
parent f3f8b399
......@@ -872,7 +872,6 @@ src/boards/python/gcompris/skin/Makefile
src/boards/python/gcompris/sound/Makefile
src/boards/python/Makefile
src/boards/Makefile
src/boards/mypaint/Makefile
src/libart_lgpl/Makefile
src/click_on_letter-activity/activity/Makefile
src/click_on_letter-activity/Makefile
......
xmldir = $(pkgdatadir)/@PACKAGE_DATA_DIR@
xml_in_files = \
followline.xml.in
xml_DATA = $(xml_in_files:.xml.in=.xml)
# Do not use the INTLTOOL_XML_RULE, we don't need to embed the translations
# in the file themselves. GCompris pick the translations from the po file at
# runtime.
#
$(xml_DATA): %.xml: %.xml.in
sed -e "s/\(<\{1\}\/*\)_/\1/g" $< > $@
# Use this directive and instead of the one above to embed the translations
# in the xml files directly, this is needed for the tool gcompris2spip
#@INTLTOOL_XML_RULE@
CLEANFILES = $(xml_DATA)
EXTRA_DIST = followline.svg
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<GCompris>
<Board
name="followline"
type="python:followline"
section="/computer/mouse"
icon="boardicons/followline.svg"
difficulty="1"
author="Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir="">
<_title>Control the hose-pipe</_title>
<_description>Tux needs to water the flowers, but the hose is blocked.</_description>
<_prerequisite></_prerequisite>
<_goal>Fine motor coordination</_goal>
<_manual>Move the mouse over the red part of the hose-pipe. This will move it, bringing it, part by part, up to the flowers. Be careful, if you move off the hose, the red part will go back down.</_manual>
<_credit></_credit>
</Board>
<Data directory=""/>
</GCompris>
# PythonTemplate Board module
import gtk
import gtk.gdk
import gcompris
import gcompris.utils
import gcompris.skin
import gnomecanvas
class Gcompris_pythontemplate:
"""Empty gcompris python class"""
......@@ -12,8 +16,33 @@ class Gcompris_pythontemplate:
# Needed to get key_press
gcomprisBoard.disable_im_context = True
# Create our rootitem. We put each canvas item in it so at the end we
# only have to kill it. The canvas deletes all the items it contains automaticaly.
self.rootitem = gcomprisBoard.canvas.root().add(
gnomecanvas.CanvasGroup,
x=0.0,
y=0.0
)
def start(self):
print "template start"
gcompris.bar_set(gcompris.BAR_OK|gcompris.BAR_LEVEL)
pixmap = gcompris.utils.load_pixmap(gcompris.skin.image_to_skin("gcompris-shapelabel.png"))
item = self.rootitem.add(
gnomecanvas.CanvasPixbuf,
pixbuf = pixmap,
x=0,
y=200,
)
item.connect("event", self.rmll)
def rmll(self, widget, event=None):
if event.type == gtk.gdk.BUTTON_PRESS:
if event.button == 1:
print event.x
print event.y
def end(self):
......
......@@ -6,7 +6,7 @@ then
plugindir=.libs
fi
./gcompris.bin -L $plugindir -P . -A resources \
./gcompris.bin -L $plugindir -P . -A ../readingh-activity/resources \
--config-dir=. -M activity \
--locale_dir=./locale -l /computer/keyboard/$activity $*
......@@ -181,7 +181,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
//gcomprisBoard->disable_im_context = TRUE;
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
"opt/scenery_background.png");
"wordsgame/scenery_background.png");
gcomprisBoard->level = 1;
......
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