From c9450cfdf43b638b2d65b5aad7362a259cae3e57 Mon Sep 17 00:00:00 2001 From: Joshua Minor Date: Mon, 11 Feb 2008 08:59:40 +0000 Subject: 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 --- (limited to 'Speak.activity/glasses.py') 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) -- cgit v0.9.1