From cb69d2e1c7ced951cbf7a31ee286b0ed92cab8a8 Mon Sep 17 00:00:00 2001 From: rcoh Date: Fri, 18 Feb 2011 16:56:43 -0500 Subject: Adding Epydoc generated docs. --- ...Light.inputs.ContinuousLocationInput-pysrc.html | 133 +++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 html/SmootLight.inputs.ContinuousLocationInput-pysrc.html (limited to 'html/SmootLight.inputs.ContinuousLocationInput-pysrc.html') diff --git a/html/SmootLight.inputs.ContinuousLocationInput-pysrc.html b/html/SmootLight.inputs.ContinuousLocationInput-pysrc.html new file mode 100644 index 0000000..788665b --- /dev/null +++ b/html/SmootLight.inputs.ContinuousLocationInput-pysrc.html @@ -0,0 +1,133 @@ + + + + + SmootLight.inputs.ContinuousLocationInput + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package SmootLight :: + Package inputs :: + Module ContinuousLocationInput + + + + + + +
[hide private]
[frames] | no frames]
+
+

Source Code for Module SmootLight.inputs.ContinuousLocationInput

+
+ 1  import util.TimeOps as clock 
+ 2  import util.ComponentRegistry as compReg 
+ 3  import util.Strings as Strings 
+ 4  from operationscore.Input import * 
+
5 -class ContinuousLocationInput(Input): +
6 '''Continuously returns one of nine positions on the screen as specified by the xloc + 7 and yloc arguments, which can take values 'min', 'max', and 'center'. ''' +
8 - def inputInit(self): +
9 xvals = {} +10 yvals = {} +11 compReg.getLock().acquire() +12 xvals['left'], yvals['bottom'], xvals['right'], yvals['top'] = compReg.getComponent('Screen').getSize() +13 compReg.getLock().release() +14 (xvals['center'], yvals['center']) = ((xvals['left']+xvals['right']) / 2, (yvals['top']+yvals['bottom']) / 2) +15 +16 self.location = (xvals[self['xloc']], yvals[self['yloc']]) +
17 +
18 - def sensingLoop(self): +
19 self.respond({Strings.LOCATION: self.location}) +
20 +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + -- cgit v1.2.3