Mercurial > code > home > repos > light9
changeset 17:43aa1ee8b3a9
some comments and garbage cleanup
author | drewp |
---|---|
date | Sun, 07 Jul 2002 06:43:40 +0000 |
parents | 7dbe8067acea |
children | 053889940418 |
files | light8/rsn.py light8/stage.py |
diffstat | 2 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/light8/rsn.py Sun Jul 07 06:33:29 2002 +0000 +++ b/light8/rsn.py Sun Jul 07 06:43:40 2002 +0000 @@ -43,6 +43,7 @@ _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 @@ xfader=Xfader(scalelevels) - - def buildinterface(*args): global channel_levels, _oldlevels, leveldisplay, xfader for w in root.winfo_children(): @@ -191,7 +190,3 @@ # 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)
--- a/light8/stage.py Sun Jul 07 06:33:29 2002 +0000 +++ b/light8/stage.py Sun Jul 07 06:43:40 2002 +0000 @@ -31,6 +31,20 @@ 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 @@ self.lmbstate='levelchange' else: + # clicked a light that wasn't selected if not shifted: self.clearselection() self.select(touching[0])