def on_click(self, model, button, modifiers): player = State.model().player index = self.selection_y functions.set_state(model, 'game') State.model().execute_action(action.ActionInstance( action = player.actions[index], source = model.player, ))
def on_click(self, model, button, modifiers): if button == mouse.LEFT: player = State.model().player index = self.rows - self.selection_y - 1 model.execute_action(action.ActionInstance( action = player.actions[index], source = model.player, )) elif button == mouse.RIGHT: functions.set_state(model, 'actions')
def on_click(self, model, button, modifiers): if button == mouse.LEFT: functions.toggle_equip(model, self.items[0][self.selection_y].item) model.display_info(None) elif button == mouse.RIGHT: functions.set_state(model, 'inventory')