Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-04-20 13:45:58 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-04-20 13:45:58 (GMT)
commit6a54f41e04204c2cb5bbc3e6b7e7b77ece44b332 (patch)
treeaf7667de09a73373c224927e65920d9230798577
parentbdc523173311b94cbbf979b3237eed36c26598cf (diff)
don't launch help animation if not running Sugar
-rw-r--r--game.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/game.py b/game.py
index a9caf86..4e28ff0 100644
--- a/game.py
+++ b/game.py
@@ -218,14 +218,15 @@ class Game():
[BACKGROUNDMASK, 0, 0, 0]))
self._frowny[-1].spr.move(self.grid.match_to_xy(3))
- for i in range(22):
- path = os.path.join(activity.get_bundle_path(),
- 'images', 'help-%d.svg' % i)
- svg_str = svg_from_file(path)
- pixbuf = svg_str_to_pixbuf(svg_str, int(self._width),
- int(self._height))
- self._help.append(Sprite(self._sprites, 0, 0, pixbuf))
- self._help[-1].hide()
+ if self._sugar:
+ for i in range(22):
+ path = os.path.join(activity.get_bundle_path(),
+ 'images', 'help-%d.svg' % i)
+ svg_str = svg_from_file(path)
+ pixbuf = svg_str_to_pixbuf(svg_str, int(self._width),
+ int(self._height))
+ self._help.append(Sprite(self._sprites, 0, 0, pixbuf))
+ self._help[-1].hide()
for c in self.clicked:
c.hide()
@@ -1103,6 +1104,8 @@ class Game():
def help_animation(self):
''' Simple explanatory animation at start of play '''
+ if not self._sugar:
+ return
self._help_index = 0
self._stop_help = False
self._help[self._help_index].set_layer(5000)