Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Martin <gary@garycmartin.com>2010-10-06 12:51:53 (GMT)
committer Gary Martin <gary@garycmartin.com>2010-10-06 12:51:53 (GMT)
commit29df3f7413402b1c0312cd99f02044c118b887f5 (patch)
tree9863a0d00786bbefeb99260a7ee45a7029d0d72a
parent5701331008c4a0173347df8d15a591f9bee56bd8 (diff)
Removed exit event check and extra exit pygame path code as it has no effect.
-rw-r--r--physics.py3
-rw-r--r--tools.py5
2 files changed, 2 insertions, 6 deletions
diff --git a/physics.py b/physics.py
index 5e64a68..f68bd31 100644
--- a/physics.py
+++ b/physics.py
@@ -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)
diff --git a/tools.py b/tools.py
index 7bb1d37..75a3440 100644
--- a/tools.py
+++ b/tools.py
@@ -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