Changeset - 43aa1ee8b3a9
[Not reviewed]
default
0 2 0
drewp - 22 years ago 2002-07-07 06:43:40

some comments and garbage cleanup
2 files changed with 16 insertions and 6 deletions:
0 comments (0 inline, 0 general)
light8/rsn.py
Show inline comments
 
@@ -43,6 +43,7 @@ fades = {}
 

	
 
_oldlevels=[None] * 68
 

	
 
# this is called on a loop, and ALSO by the Scales
 
def changelevel(*args):
 
    'Amp trims slider'
 
    global _oldlevels
 
@@ -87,8 +88,6 @@ def quit(*args):
 

	
 
xfader=Xfader(scalelevels)
 

	
 

	
 

	
 
def buildinterface(*args):
 
    global channel_levels, _oldlevels, leveldisplay, xfader
 
    for w in root.winfo_children():
 
@@ -191,7 +190,3 @@ bindkeys(root,'<Escape>', quit)
 
# bindkeys(root,'<s>', make_sub)
 
backgroundloop()
 
root.mainloop() # Receiver switches main
 

	
 
while 1:
 
    for lev in range(0,255,25)+range(255,0,-25):
 
        sleep(.2)
light8/stage.py
Show inline comments
 
@@ -31,6 +31,20 @@ class Stage(Canvas):
 
    lights should be able to be interactively 'locked', which blocks
 
    them from being selected. 
 

	
 
    API:
 
      __init__(parent,**kw)
 
        put pass any canvas options you want
 
        
 
      setimage(stageimage)
 
        sets image to given filename (ppm, gif, etc) and resizes the canvas to the image size
 

	
 
      addlight(name, location, aim=None)
 
        location and aim are pixel coord tuples. name will be passed back to you in the callback (see below)
 

	
 
      setlightchangecb(cb)
 
        give a function which will be called like this: cb(list_of_light_names, delta)
 
      
 

	
 
    """
 
    def __init__(self,parent,**kw):
 
        Canvas.__init__(self,parent,**kw)
 
@@ -130,6 +144,7 @@ class Stage(Canvas):
 
                    self.lmbstate='levelchange'
 
                    
 
            else:
 
                # clicked a light that wasn't selected
 
                if not shifted:
 
                    self.clearselection()
 
                self.select(touching[0])
0 comments (0 inline, 0 general)