diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2010-02-03 22:36:43 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2010-02-03 22:36:43 (GMT) |
commit | 6913d97067e79a86045d0e306e15367dd5e48ea8 (patch) | |
tree | 587e23a9b076f603bad137e54beb43d32a538e12 /TurtleArtActivity.py | |
parent | ebb2f2da5760329d5c15785f4429a009806d25a2 (diff) |
dynamic scaling of blocks
Diffstat (limited to 'TurtleArtActivity.py')
-rw-r--r-- | TurtleArtActivity.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py index f2f0722..4e1ea72 100644 --- a/TurtleArtActivity.py +++ b/TurtleArtActivity.py @@ -56,7 +56,6 @@ import os.path import subprocess import tarfile import sys -import re from taconstants import * from taexporthtml import save_html @@ -538,22 +537,22 @@ class TurtleArtActivity(activity.Activity): # maybe we can use a stack to share events to new-comers? # self._share += "text + "\n" if text[0] == 'p': # button press - e,x,y,mask = re.split(":",text) + e,x,y,mask = text.split(":") # _logger.debug("receiving button press: "+x+" "+y+" "+mask) if mask == 'T': self.tw.button_press(True,int(x),int(y),False) else: self.tw.button_press(False,int(x),int(y),False) elif text[0] == 'r': # block release - e,x,y = re.split(":",text) + e,x,y = text.split(":") # _logger.debug("receiving button release: " + x + " " + y) self.tw.button_release(int(x),int(y),False) elif text[0] == 'm': # mouse move - e,x,y = re.split(":",text) + e,x,y = text.split(":") _logger.debug("receiving move: " + x + " " + y) self.tw.mouse_move(0,0,False,int(x),int(y)) elif text[0] == 'k': # typing - e,mask,keyname = re.split(":",text,3) + e,mask,keyname = text.split(":",3) # _logger.debug("recieving key press: " + mask + " " + keyname) if mask == 'T': self.tw.key_press(True,keyname,False) @@ -569,7 +568,7 @@ class TurtleArtActivity(activity.Activity): elif text[0] == 'I': # receiving current state if self.waiting_for_blocks: _logger.debug("receiving project from sharer") - e,text = re.split(":",text,2) + e,text = text.split(":",2) if len(text) > 0: self.tw.new_project() self.tw.process_data(data_from_string(text)) |