]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - helpers/__init__.py
Add pirate example config.yml + description
[perso/Immae/Projets/Python/MusicSampler.git] / helpers / __init__.py
index b1723ee8e51c169ef5ccd922169a0e4ecefb6340..b7acbf55ee89683d447daee097d4bc78effb0d5b 100644 (file)
@@ -47,3 +47,13 @@ def parse_config(mapping):
                     action_args[argument] = action[action_name][argument]
 
             key.add_action(action_name, **action_args)
+
+    for key_property in config['key_properties']:
+        key = mapping.find_by_unicode(key_property)
+        if key is None:
+            continue
+
+        if 'description' in config['key_properties'][key_property]:
+            key.set_description(config['key_properties'][key_property]['description'])
+        if 'color' in config['key_properties'][key_property]:
+            key.set_color(config['key_properties'][key_property]['color'])