import yaml
import sys
-from .music_file import *
+from .music_file import MusicFile
from .mixer import Mixer
from . import Config, gain, error_print
from .action import Action
def _on_keyboard_down(self, keyboard, keycode, text, modifiers):
key = self.find_by_key_code(keycode)
if len(modifiers) == 0 and key is not None:
- threading.Thread(name="MSKeyAction", target=key.do_actions).start()
+ threading.Thread(name="MSKeyAction", target=key.run).start()
elif 'ctrl' in modifiers and (keycode[0] == 113 or keycode[0] == '99'):
for thread in threading.enumerate():
if thread.getName()[0:2] != "MS":
for key in self.children:
if not type(key).__name__ == "Key":
continue
- if not key.is_key_ready:
+ if not key.is_loaded_or_failed():
return True
self.ready_color = [0, 1, 0, 1]
return False
running = self.running
self.running = []
for (key, start_time) in running:
- key.interrupt_action()
+ key.interrupt()
def start_running(self, key, start_time):
self.running.append((key, start_time))