diff options
author | Joshua Minor <j@lux.vu> | 2008-02-11 08:59:40 (GMT) |
---|---|---|
committer | Joshua Minor <j@lux.vu> | 2008-02-11 08:59:40 (GMT) |
commit | c9450cfdf43b638b2d65b5aad7362a259cae3e57 (patch) | |
tree | 7f12677722afb735abebc5316ee97b69cdb03deb /Speak.activity/glasses.py | |
parent | ea1c1ca1883a597f82ee7f2c8f7ec66777d698ee (diff) |
Eyes now track the text cursor
Eyes now face ahead when speaking
Added text history popup + arrow key navigation
Fixed mouth corners so they match
Text doesn't disappear when you press Enter
Diffstat (limited to 'Speak.activity/glasses.py')
-rw-r--r-- | Speak.activity/glasses.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Speak.activity/glasses.py b/Speak.activity/glasses.py index afc68ef..61965a6 100644 --- a/Speak.activity/glasses.py +++ b/Speak.activity/glasses.py @@ -29,13 +29,10 @@ class Glasses(Eye): def expose(self, widget, event): bounds = self.get_allocation() - mouseX, mouseY = self.get_mouse() - eyeSize = min(bounds.width, bounds.height) outlineWidth = eyeSize/20.0 pupilSize = eyeSize/10.0 - pupilX = max(min(mouseX - bounds.x, bounds.width), 0) - pupilY = max(min(mouseY - bounds.y, bounds.height), 0) + pupilX, pupilY = self.pupil_position() dX = pupilX - bounds.width/2. dY = pupilY - bounds.height/2. distance = math.sqrt(dX*dX + dY*dY) |