def delete(self): snd.play('delete') self.clearactionlist() del self.display[input.actions_order[self.currentaction]][self.currentcontrol] input.setdisplay(self.display) self.buildactionlist() self.drawactionlist() self.inputstate = BUTTONS self.moveto(self.targetbutton())
def add(self, i): if not i.release: if i.all: snd.play('select_choose') self.clearactionlist() self.display[input.actions_order[self.currentaction]].append((i.type, i.normalized)) input.setdisplay(self.display) self.buildactionlist() self.drawactionlist() else: snd.play('incorrect') self.inputstate = BUTTONS self.moveto(self.targetbutton())