Changeset - 60b6471fb0d2
[Not reviewed]
default
0 1 0
David McClosky - 20 years ago 2005-06-16 06:32:36
dmcc@bigasterisk.com
TkGyro: stamp current sub+level when toggling modes
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
bin/gyrocontroller
Show inline comments
 
@@ -60,24 +60,25 @@ class AbstractSimpleController(SubClient
 
    def next(self):
 
        if self.keep_solo_mode == 'keep':
 
            self.kept_levels[self.current_sub] = self.current_level
 

	
 
        self.current_sub = self.submasters.get_sub_by_name(self.all_subs.next())
 
    def prev(self):
 
        if self.keep_solo_mode == 'keep':
 
            self.kept_levels[self.current_sub] = self.current_level
 

	
 
        self.current_sub = self.submasters.get_sub_by_name(self.all_subs.prev())
 
    def toggle_keep_mode(self):
 
        if self.keep_solo_mode == 'keep':
 
            self.kept_levels[self.current_sub] = self.current_level
 
            self.keep_solo_mode = 'solo'
 
        else:
 
            self.keep_solo_mode = 'keep'
 

	
 
    def get_levels_as_sub(self):
 
        if self.keep_solo_mode == 'keep':
 
            # send all levels in self.kept_levels
 
            levelsub = combine_subdict(self.kept_levels)
 
        else:
 
            levelsub = self.current_sub * self.current_level
 

	
 
        return levelsub
0 comments (0 inline, 0 general)