From a45a109c8daea20a00ed7f77d89e4a08c22b2faf Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 31 Mar 2019 17:12:48 +0200 Subject: [PATCH] battlesystem: build skill menu --- .../scenes/battlesystem/controller/menu.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/controller/menu.lua b/sonic-radiance.love/scenes/battlesystem/controller/menu.lua index 7287ba0..db6f57c 100644 --- a/sonic-radiance.love/scenes/battlesystem/controller/menu.lua +++ b/sonic-radiance.love/scenes/battlesystem/controller/menu.lua @@ -25,6 +25,7 @@ end function MenuConstructor:build(character) self:buildBaseMenu(character) + self:buildSkillMenu(character) end function MenuConstructor:buildBaseMenu(character) @@ -43,13 +44,13 @@ function MenuConstructor:set(currentCharacter) self:reconstruct(currentCharacter) end -function MenuConstructor:buildSkillMenu() +function MenuConstructor:buildSkillMenu(character) CharacterMenu(self.controller, "SkillMenu", MENUPOS_X1 - 16, MENUPOS_Y) - local list = game.characters:getSkillList(self.character.charid) + local list = game.characters:getSkillList(character.charid) for k,v in pairs(list) do CharMenuWidget(self.controller, "SkillMenu", k, "", character) end - CharMenuWidget(self.controller, "Back", v, "", character) + CharMenuWidget(self.controller, "SkillMenu", "Retour", "", character) self.controller.menusystem.menus["SkillMenu"]:setCancelWidget() end