X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=helpers%2Fkey.py;h=66e792d514ed2ac31a10a273dc95605ff2d5b8ac;hb=201d8411d7e1f70f13ced3fc797a696e6593f3a0;hp=113cf8e94801fdaa15ba529f6d94509e5edc7d5b;hpb=70cfb266c677c77675def8ac26babf7c8ac7d0f8;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git diff --git a/helpers/key.py b/helpers/key.py index 113cf8e..66e792d 100644 --- a/helpers/key.py +++ b/helpers/key.py @@ -107,6 +107,23 @@ class Key(ButtonBehavior, Widget): description = ListProperty([]) state = StringProperty("") + def get_alias_line_cross_color(self): + if not self.is_failed() and ( + not self.is_loaded(allow_substates=True)\ + or self.is_loaded_running()\ + or self.is_loaded_protecting_repeat()): + return [120/255, 120/255, 120/255, 1] + else: + return [0, 0, 0, 0] + + def set_alias_line_cross_color(self): + pass + + line_cross_color = AliasProperty( + get_alias_line_cross_color, + set_alias_line_cross_color, + bind=['state']) + def get_alias_line_color(self): if self.is_loaded_running(): return [0, 0, 0, 1]