diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-10-06 13:30:59 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-10-06 13:30:59 (GMT) |
commit | 097683783bbfc05755eb8329e2375b6870f9194a (patch) | |
tree | 91230e6db20376b2ae7fe0b40df574a588ab15d2 /bounce.py | |
parent | 36202b31f123eb3a1b8b5d248f33fbe9236badef (diff) |
code cleanup in light of #2570
Diffstat (limited to 'bounce.py')
-rw-r--r-- | bounce.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -249,7 +249,6 @@ class Bounce(): self.press = None # sprite under mouse click self.mode = 'fractions' self.new_bounce = False - self.paused = True self.dx = 0. # ball horizontal trajectory # acceleration (with dampening) @@ -277,7 +276,7 @@ class Bounce(): ''' Pause play when visibility changes ''' if self.timeout is not None: gobject.source_remove(self.timeout) - self.paused = True + self.timeout = None def _button_press_cb(self, win, event): ''' Callback to handle the button presses ''' @@ -291,10 +290,9 @@ class Bounce(): win.grab_focus() x, y = map(int, event.get_coords()) if self.press is not None: - if self.paused and self.press == self.ball: + if self.timeout is None and self.press == self.ball: self._choose_a_fraction() self._move_ball() - self.paused = False return True def _move_ball(self): |