Mercurial > code > home > repos > light9
diff light8/rsn.py @ 34:411de8b46aef
the famous you-are-in-the-process-of-changing-this-light indicator.
the famous you-are-in-the-process-of-changing-this-light indicator.
red = going up
blue = going down
also, a generic color fader in uihelpers.py -- unused (as of now)
author | dmcc |
---|---|
date | Sun, 07 Jul 2002 12:06:16 +0000 |
parents | d9a0f6c88b39 |
children | 3cbe7110d8f7 |
line wrap: on
line diff
--- a/light8/rsn.py Sun Jul 07 10:55:05 2002 +0000 +++ b/light8/rsn.py Sun Jul 07 12:06:16 2002 +0000 @@ -4,7 +4,7 @@ from Tkinter import * from time import sleep from signal import * -import sys, thread, cPickle +import sys, thread, cPickle, math import io from uihelpers import * @@ -69,7 +69,7 @@ leveldisplay_tl = toplevelat(873,400) leveldisplay_tl.bind('<Escape>', sys.exit) - leveldisplay = Leveldisplay(leveldisplay_tl, self.channel_levels) + self.leveldisplay = Leveldisplay(leveldisplay_tl, self.channel_levels) Console() @@ -105,10 +105,18 @@ levels = [int(l) for l in levels] - for lev,lab,oldlev in zip(levels, self.channel_levels, self.oldlevels): + for lev,lab,oldlev,numlab in zip(levels, self.channel_levels, + self.oldlevels, + self.leveldisplay.number_labels): if lev != oldlev: lab.config(text="%d" % lev) colorlabel(lab) + if lev < oldlev: + numlab['bg'] = 'red' + else: + numlab['bg'] = 'blue' + else: + numlab['bg'] = 'lightPink' self.oldlevels = levels[:]