Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/game.py
diff options
context:
space:
mode:
authorRafael Ortiz <rafael@activitycentral.com>2012-04-10 16:07:04 (GMT)
committer Rafael Ortiz <rafael@activitycentral.com>2012-04-10 16:07:04 (GMT)
commit43ad8fea2f92a2ebe248862b2cafd3cf8c69bbba (patch)
tree358a01ae36818eaf772965697b534fcdc2939fe7 /game.py
parent0cbb96ec56dc0faf0d29428cfccf82788e5f7fb7 (diff)
going back to v16 because a regretion.
Diffstat (limited to 'game.py')
-rw-r--r--game.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/game.py b/game.py
index 8482123..e9ec3b4 100644
--- a/game.py
+++ b/game.py
@@ -298,8 +298,13 @@ class MazeGame:
print "Message from unknown buddy?"
elif event.type == pygame.USEREVENT:
+ # process our buttons
+ if hasattr(event, 'action') and event.action == 'harder_button':
+ self.harder()
+ elif hasattr(event, 'action') and event.action == 'easier_button':
+ self.easier()
# process file save / restore events
- if event.code == olpcgames.FILE_READ_REQUEST:
+ elif event.code == olpcgames.FILE_READ_REQUEST:
log.debug('Loading the state of the game...')
state = json.loads(event.metadata['state'])
log.debug('Loaded data: %s', state)