From 95d395e27a129fcec35057a76b68f6bf613ed472 Mon Sep 17 00:00:00 2001 From: Gary Martin Date: Sun, 23 Aug 2009 18:51:18 +0000 Subject: Use a user event for stop/start rather than injecting a key event. --- (limited to 'activity.py') diff --git a/activity.py b/activity.py index eafb155..b7f0d33 100644 --- a/activity.py +++ b/activity.py @@ -68,7 +68,7 @@ class PhysicsActivity(olpcgames.PyGameActivity): return activity_toolbar def stop_play_cb(self, button): - pygame.event.post(olpcgames.eventwrap.Event(pygame.KEYDOWN, key=pygame.K_SPACE)) + pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT, action="stop_start_toggle")) self.stop_play_state = not self.stop_play_state # Update button if self.stop_play_state: -- cgit v0.9.1