battlesystem: make skillmenu navigable

This commit is contained in:
Kazhnuz 2019-03-31 17:15:27 +02:00
parent a45a109c8d
commit 085701efc0

View file

@ -31,7 +31,7 @@ end
function MenuConstructor:buildBaseMenu(character)
CharacterMenu(self.controller, "BaseMenu", MENUPOS_X1 - 16, MENUPOS_Y)
CharMenuWidget(self.controller, "BaseMenu", "Attaquer", "", character)
CharMenuWidget(self.controller, "BaseMenu", "Techniques", "", character)
SubMenuWidget(self.controller, "BaseMenu", "Techniques", "SkillMenu", character)
CharMenuWidget(self.controller, "BaseMenu", "Objets", "", character)
CharMenuWidget(self.controller, "BaseMenu", "Défendre", "", character)
CharMenuWidget(self.controller, "BaseMenu", "Fuite", "", character)
@ -50,7 +50,7 @@ function MenuConstructor:buildSkillMenu(character)
for k,v in pairs(list) do
CharMenuWidget(self.controller, "SkillMenu", k, "", character)
end
CharMenuWidget(self.controller, "SkillMenu", "Retour", "", character)
SubMenuWidget(self.controller, "SkillMenu", "Retour", "BaseMenu", character)
self.controller.menusystem.menus["SkillMenu"]:setCancelWidget()
end
@ -148,7 +148,7 @@ function SubMenuWidget:new(scene, menu_name, label, newmenu, character)
end
function SubMenuWidget:action()
self.scene.menusystem:switchMenu(newmenu)
self.scene.menusystem:switchMenu(self.newmenu)
end
return MenuConstructor