Mercurial > code > home > repos > light9
changeset 275:c7bba03ddc36
keyboardcomposer has 'All to Zero' aka blackout
author | David McClosky <dmcc@bigasterisk.com> |
---|---|
date | Fri, 17 Jun 2005 18:11:45 +0000 |
parents | 9bf9685f5aae |
children | 77c39b6e71ab |
files | bin/keyboardcomposer |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/keyboardcomposer Fri Jun 17 17:59:37 2005 +0000 +++ b/bin/keyboardcomposer Fri Jun 17 18:11:45 2005 +0000 @@ -15,7 +15,6 @@ from light9 import dmxclient, showconfig, networking from light9.uihelpers import toplevelat - nudge_keys = { 'up' : list('qwertyuiop'), 'down' : list('asdfghjkl') @@ -87,6 +86,9 @@ self.buttonframe = Frame(self, bg='black') self.buttonframe.pack(side=BOTTOM) + self.alltozerobutton = Button(self.buttonframe, text="All to Zero", + command=self.alltozero, bg='black', fg='white') + self.alltozerobutton.pack(side='left') self.refreshbutton = Button(self.buttonframe, text="Refresh", command=self.refresh, bg='black', fg='white') self.refreshbutton.pack(side=LEFT) @@ -238,6 +240,11 @@ self.buttonframe.destroy() self.draw_ui() + def alltozero(self): + for name, subtk in self.name_to_subtk.items(): + if subtk.scale.scale_var.get() != 0: + subtk.scale.fade(value=0.0, length=0) + class LevelServer(xmlrpc.XMLRPC): def __init__(self,name_to_subtk): self.name_to_subtk = name_to_subtk @@ -251,7 +258,6 @@ ret=str(e) return ret - if __name__ == "__main__": s = Submasters()