battlesystem: build skill menu

This commit is contained in:
Kazhnuz 2019-03-31 17:12:48 +02:00
parent a23e38fe31
commit a45a109c8d

View file

@ -25,6 +25,7 @@ end
function MenuConstructor:build(character) function MenuConstructor:build(character)
self:buildBaseMenu(character) self:buildBaseMenu(character)
self:buildSkillMenu(character)
end end
function MenuConstructor:buildBaseMenu(character) function MenuConstructor:buildBaseMenu(character)
@ -43,13 +44,13 @@ function MenuConstructor:set(currentCharacter)
self:reconstruct(currentCharacter) self:reconstruct(currentCharacter)
end end
function MenuConstructor:buildSkillMenu() function MenuConstructor:buildSkillMenu(character)
CharacterMenu(self.controller, "SkillMenu", MENUPOS_X1 - 16, MENUPOS_Y) 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 for k,v in pairs(list) do
CharMenuWidget(self.controller, "SkillMenu", k, "", character) CharMenuWidget(self.controller, "SkillMenu", k, "", character)
end end
CharMenuWidget(self.controller, "Back", v, "", character) CharMenuWidget(self.controller, "SkillMenu", "Retour", "", character)
self.controller.menusystem.menus["SkillMenu"]:setCancelWidget() self.controller.menusystem.menus["SkillMenu"]:setCancelWidget()
end end