From 43ad8fea2f92a2ebe248862b2cafd3cf8c69bbba Mon Sep 17 00:00:00 2001 From: Rafael Ortiz Date: Tue, 10 Apr 2012 16:07:04 +0000 Subject: going back to v16 because a regretion. --- (limited to 'game.py') 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) -- cgit v0.9.1