diff options
Diffstat (limited to 'physics.py')
-rw-r--r-- | physics.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -34,8 +34,8 @@ import sugargame sys.path.append("lib/") import pkg_resources # If your architecture is different, comment these lines and install the modules in your system. -#sys.path.append("lib/Elements-0.13-py2.5.egg") -#sys.path.append("lib/Box2D-2.0.2b1-py2.5-linux-i686.egg") +sys.path.append("lib/Elements-0.13-py2.5.egg") +sys.path.append("lib/Box2D-2.0.2b1-py2.5-linux-i686.egg") import Box2D as box2d import elements import tools @@ -72,7 +72,7 @@ class PhysicsGame: self.world.add.ground() # Fake a Sugar cursor for the pyGame canvas area - self.show_fake_cursor = False + self.show_fake_cursor = True pygame.mouse.set_cursor((8, 8), (0, 0), (0, 0, 0, 0, 0, 0, 0, 0), (0, 0, 0, 0, 0, 0, 0, 0)) self.cursor_picture = pygame.image.load('standardcursor.png') @@ -90,6 +90,9 @@ class PhysicsGame: for event in pygame.event.get(): self.currentTool.handleEvents(event) + if event.type == MOUSEBUTTONUP: + if event.button == 1: + self.show_fake_cursor = True if self.in_focus: # Drive motors @@ -115,7 +118,7 @@ class PhysicsGame: # Show Sugar like cursor for UI consistancy if self.show_fake_cursor: self.screen.blit(self.cursor_picture, - pygame.mouse.get_pos()) + pygame.mouse.get_pos()) # Flip Display pygame.display.flip() |