aboutsummaryrefslogtreecommitdiff
path: root/inputs/PygameInput.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-20 14:50:08 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-20 14:50:08 -0500
commit2736307c1d6d67868ca54a3df951f9e959efedd0 (patch)
tree50a61c798d52987f8fe575f678aaff5b5b9455b9 /inputs/PygameInput.py
parent7386cbc7ce48e3996d92d84cff3d1a4dab8f538d (diff)
Util cleanup is done! Util.py is now refactored into the util module. Woo! RCOH
Diffstat (limited to 'inputs/PygameInput.py')
-rw-r--r--inputs/PygameInput.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/inputs/PygameInput.py b/inputs/PygameInput.py
index 1f438d6..f69d0f5 100644
--- a/inputs/PygameInput.py
+++ b/inputs/PygameInput.py
@@ -1,4 +1,5 @@
import time, Util
+import util.Strings as Strings
from operationscore.Input import *
import pygame
from pygame.locals import *
@@ -8,13 +9,13 @@ class PygameInput(Input):
def sensingLoop(self):
#try:
if self['FollowMouse']:
- self.respond({Util.location: pygame.mouse.get_pos()})
+ self.respond({Strings.LOCATION: pygame.mouse.get_pos()})
return
for event in pygame.event.get():
if event.type is KEYDOWN:
- self.respond({Util.location: (5,5),'Key': event.key})
+ self.respond({Strings.LOCATION: (5,5),'Key': event.key})
if event.type is MOUSEBUTTONDOWN:
- self.respond({Util.location: pygame.mouse.get_pos()})
+ self.respond({Strings.LOCATION: pygame.mouse.get_pos()})
#except:
#raise Exception('Pygame not initialized. Pygame must be \
#initialized.')