Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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