X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=helpers%2Fkey.py;h=2b9d1520e8549a5f6f4f6aa43a369f45df078d20;hb=635dea02d27ba499861085f8c7ead14d685bddf6;hp=b5c1af95a3901a0a1e095506f4538f52399775c9;hpb=62a8b07a2264101fd6d9c201267966e3c5de0cd4;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git diff --git a/helpers/key.py b/helpers/key.py index b5c1af9..2b9d152 100644 --- a/helpers/key.py +++ b/helpers/key.py @@ -107,6 +107,20 @@ class Key(ButtonBehavior, Widget): description = ListProperty([]) state = StringProperty("") + def get_alias_line_cross_color(self): + if 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] @@ -124,6 +138,8 @@ class Key(ButtonBehavior, Widget): return [1, 1, 1, 1] elif self.is_loaded_protecting_repeat(): return [*self.custom_color, 100/255] + elif self.is_loaded_running(): + return [*self.custom_color, 100/255] elif self.is_loaded(allow_substates=True): return [*self.custom_color, 1] elif self.is_failed():