Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
Diffstat (limited to 'activity.py')
-rwxr-xr-xactivity.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/activity.py b/activity.py
index c7de70e..47d466f 100755
--- a/activity.py
+++ b/activity.py
@@ -31,6 +31,8 @@ from sugar.activity.widgets import ActivityToolbarButton
from sugar.graphics.toolbutton import ToolButton
from sugar.activity.widgets import StopButton
+from helpbutton import HelpButton
+
from gettext import gettext as _
import sugargame.canvas
@@ -73,16 +75,27 @@ class Activity(activity.Activity):
toolbar_box.toolbar.insert(separator, -1)
separator.show()
+ self.create_help(toolbar_box.toolbar)
+
stop_button = StopButton(self)
toolbar_box.toolbar.insert(stop_button, -1)
stop_button.show()
+ self.show_all()
+
+ def create_help(self, toolbar):
+ helpitem = HelpButton()
+ toolbar.insert(helpitem, -1)
+ helpitem.show()
+ helpitem.add_paragraph(_('Click in the background to drop an apple or'))
+ helpitem.add_paragraph(_('press A for an apple'), 'apple')
+ helpitem.add_paragraph(_('press C for a carrot'), 'carrot')
+ helpitem.add_paragraph(_('press H for an hay'), 'hay')
+ helpitem.add_paragraph(_('while you moves the mouse'))
def read_file(self, file_path):
- #self.game.read_file(file_path)
pass
def write_file(self, file_path):
- #self.game.write_file(file_path)
pass