Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools.py
diff options
context:
space:
mode:
authorWade Brainerd <wadetb@gmail.com>2009-10-29 03:33:07 (GMT)
committer Wade Brainerd <wadetb@gmail.com>2009-10-29 03:33:07 (GMT)
commite245a2fbca067dee091ae27c78cad063bd3ffbec (patch)
tree6a285e9563552afa5f6b989092388202d424036d /tools.py
parent3c152182fe74f379f2052d101ebef80c295e2353 (diff)
Replaced olpcgames with new sugargame module.pygame-testing
Sugargame is vastly simpler and cleaner than olpcgames, and integrates GTK and Pygame more elegantly. Some olpcgames features are still missing and there are likely bugs.
Diffstat (limited to 'tools.py')
-rw-r--r--tools.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/tools.py b/tools.py
index ae32ece..8645a81 100644
--- a/tools.py
+++ b/tools.py
@@ -4,7 +4,6 @@
# By Alex Levenson
#==================================================================
import pygame
-import olpcgames
from pygame.locals import *
from helpers import *
from inspect import getmro
@@ -26,23 +25,8 @@ class Tool(object):
if event.type == QUIT:
# bye bye! Hope you had fun!
self.game.running = False
- elif event.type == USEREVENT:
- if hasattr(event,"action"):
- if event.action == "stop_start_toggle":
- # stop/start simulation
- self.game.world.run_physics = not self.game.world.run_physics
- elif self.game.toolList.has_key(event.action):
- self.game.setTool(event.action)
- elif hasattr(event,"code"):
- if event.code == olpcgames.FILE_WRITE_REQUEST:
- #saving to journal
- self.game.world.add.remove_mouseJoint()
- self.game.world.json_save(event.filename)
- elif event.code == olpcgames.FILE_READ_REQUEST:
- #loading from journal
- self.game.world.json_load(event.filename)
elif event.type == MOUSEBUTTONDOWN and event.button == 1:
- self.game.canvas.grab_focus()
+ #self.game.canvas.grab_focus()
handled = False
else:
handled = False