X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=helpers%2Fkey.py;h=113cf8e94801fdaa15ba529f6d94509e5edc7d5b;hb=70cfb266c677c77675def8ac26babf7c8ac7d0f8;hp=3c98ce74617ef15a7940afdbf4214ad29ce9f796;hpb=343822904ee26955e622e325539c64aee1c2112e;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git diff --git a/helpers/key.py b/helpers/key.py index 3c98ce7..113cf8e 100644 --- a/helpers/key.py +++ b/helpers/key.py @@ -85,8 +85,8 @@ class Key(ButtonBehavior, Widget): 'source': 'loaded', 'dest': 'loaded_running', 'after': ['run_actions', 'finish'], - # if a child, like loaded_no_actions, has no transitions, then it is - # bubbled to the parent, and we don't want that. + # if a child, like loaded_no_actions, has no transitions, then it + # is bubbled to the parent, and we don't want that. 'conditions': ['is_loaded'] }, { @@ -124,6 +124,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(): @@ -191,7 +193,7 @@ class Key(ButtonBehavior, Widget): for self.current_action in self.actions: if self.parent.keep_running(self, start_time): self.list_actions() - self.current_action.run() + self.current_action.run(start_time) self.list_actions(last_action_finished=True) self.parent.finished_running(self, start_time)