diff options
author | Gary Martin <gary@garycmartin.com> | 2010-10-06 12:51:53 (GMT) |
---|---|---|
committer | Gary Martin <gary@garycmartin.com> | 2010-10-06 12:51:53 (GMT) |
commit | 29df3f7413402b1c0312cd99f02044c118b887f5 (patch) | |
tree | 9863a0d00786bbefeb99260a7ee45a7029d0d72a | |
parent | 5701331008c4a0173347df8d15a591f9bee56bd8 (diff) |
Removed exit event check and extra exit pygame path code as it has no effect.
-rw-r--r-- | physics.py | 3 | ||||
-rw-r--r-- | tools.py | 5 |
2 files changed, 2 insertions, 6 deletions
@@ -78,8 +78,7 @@ class PhysicsGame: self.show_fake_cursor = True def run(self): - self.running = True - while self.running: + while True: for event in pygame.event.get(): self.currentTool.handleEvents(event) @@ -43,10 +43,7 @@ class Tool(object): def handleEvents(self, event): handled = True # Default event handling - if event.type == QUIT: - # Bye bye! Hope you had fun! - self.game.running = False - elif event.type == USEREVENT: + if event.type == USEREVENT: if hasattr(event,"action"): if event.action == "stop_start_toggle": # Stop/start simulation |