def add_action(self, action_name, **arguments):
self.actions.append(Action(action_name, self, **arguments))
+ def interrupt_action(self):
+ self.current_action.interrupt()
+
def do_actions(self):
if not self.enabled:
return None
+ self.parent.parent.ids['KeyList'].append(self.key_sym)
print("running actions for {}".format(self.key_sym))
start_time = time.time()
self.parent.start_running(self, start_time)
action_number = 0
- for action in self.actions:
+ for self.current_action in self.actions:
if self.parent.keep_running(self, start_time):
self.list_actions(action_number = action_number + 0.5)
- action.run()
+ self.current_action.run()
action_number += 1
self.list_actions(action_number = action_number)