diff options
Diffstat (limited to 'music_sampler.py')
-rw-r--r-- | music_sampler.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/music_sampler.py b/music_sampler.py index 41b71be..c10b634 100644 --- a/music_sampler.py +++ b/music_sampler.py | |||
@@ -62,21 +62,18 @@ class ActionList(RelativeLayout): | |||
62 | action_title = StringProperty("") | 62 | action_title = StringProperty("") |
63 | action_list = ListProperty([]) | 63 | action_list = ListProperty([]) |
64 | 64 | ||
65 | def update_list(self, key, action_number = 0): | 65 | def update_list(self, key, action_descriptions): |
66 | self.action_title = "actions linked to key {}:".format(key.key_sym) | 66 | self.action_title = "actions linked to key {}:".format(key.key_sym) |
67 | self.action_list = [] | 67 | self.action_list = [] |
68 | 68 | ||
69 | action_descriptions = [action.description() for action in key.actions] | 69 | for [action, status] in action_descriptions: |
70 | 70 | if status == "done": | |
71 | for index, description in enumerate(action_descriptions): | ||
72 | if index < int(action_number): | ||
73 | icon = "✓" | 71 | icon = "✓" |
74 | elif index + 0.5 == action_number: | 72 | elif status == "current": |
75 | icon = "✅" | 73 | icon = "✅" |
76 | else: | 74 | else: |
77 | icon = " " | 75 | icon = " " |
78 | 76 | self.action_list.append([icon, action]) | |
79 | self.action_list.append([icon, description]) | ||
80 | 77 | ||
81 | class Screen(FloatLayout): | 78 | class Screen(FloatLayout): |
82 | pass | 79 | pass |