]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - music_sampler.py
Remove fonts from directory
[perso/Immae/Projets/Python/MusicSampler.git] / music_sampler.py
index 41b71be5bd1bd96502b18981c96725bef8554446..f5df2bf0dd3191ac3438d2352a10f6ce0ef61476 100644 (file)
@@ -14,6 +14,8 @@ from kivy.lang import Builder
 from helpers.key import Key
 from helpers.mapping import Mapping
 
+helpers.register_fonts()
+
 class KeyList(RelativeLayout):
     keylist = ListProperty([])
     first_key = StringProperty("")
@@ -62,21 +64,18 @@ class ActionList(RelativeLayout):
     action_title = StringProperty("")
     action_list = ListProperty([])
 
-    def update_list(self, key, action_number = 0):
+    def update_list(self, key, action_descriptions):
         self.action_title = "actions linked to key {}:".format(key.key_sym)
         self.action_list = []
 
-        action_descriptions = [action.description() for action in key.actions]
-
-        for index, description in enumerate(action_descriptions):
-            if index < int(action_number):
+        for [action, status] in action_descriptions:
+            if status == "done":
                 icon = "✓"
-            elif index + 0.5 == action_number:
+            elif status == "current":
                 icon = "✅"
             else:
                 icon = " "
-
-            self.action_list.append([icon, description])
+            self.action_list.append([icon, action])
 
 class Screen(FloatLayout):
     pass