diff --git a/light8/rsn.py b/light8/rsn.py --- a/light8/rsn.py +++ b/light8/rsn.py @@ -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,'', quit) # bindkeys(root,'', make_sub) backgroundloop() root.mainloop() # Receiver switches main - -while 1: - for lev in range(0,255,25)+range(255,0,-25): - sleep(.2) diff --git a/light8/stage.py b/light8/stage.py --- a/light8/stage.py +++ b/light8/stage.py @@ -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])