battlesystem: add the objectmenu structure

This commit is contained in:
Kazhnuz 2019-03-31 17:21:27 +02:00
parent 085701efc0
commit 4b2a59b413

View file

@ -26,13 +26,14 @@ end
function MenuConstructor:build(character) function MenuConstructor:build(character)
self:buildBaseMenu(character) self:buildBaseMenu(character)
self:buildSkillMenu(character) self:buildSkillMenu(character)
self:buildObjectMenu(character)
end end
function MenuConstructor:buildBaseMenu(character) function MenuConstructor:buildBaseMenu(character)
CharacterMenu(self.controller, "BaseMenu", MENUPOS_X1 - 16, MENUPOS_Y) CharacterMenu(self.controller, "BaseMenu", MENUPOS_X1 - 16, MENUPOS_Y)
CharMenuWidget(self.controller, "BaseMenu", "Attaquer", "", character) CharMenuWidget(self.controller, "BaseMenu", "Attaquer", "", character)
SubMenuWidget(self.controller, "BaseMenu", "Techniques", "SkillMenu", character) SubMenuWidget(self.controller, "BaseMenu", "Techniques", "SkillMenu", character)
CharMenuWidget(self.controller, "BaseMenu", "Objets", "", character) SubMenuWidget(self.controller, "BaseMenu", "Objets", "ObjectMenu", character)
CharMenuWidget(self.controller, "BaseMenu", "Défendre", "", character) CharMenuWidget(self.controller, "BaseMenu", "Défendre", "", character)
CharMenuWidget(self.controller, "BaseMenu", "Fuite", "", character) CharMenuWidget(self.controller, "BaseMenu", "Fuite", "", character)
CharMenuWidget(self.controller, "BaseMenu", "Retour", "", character) CharMenuWidget(self.controller, "BaseMenu", "Retour", "", character)
@ -55,6 +56,36 @@ function MenuConstructor:buildSkillMenu(character)
self.controller.menusystem.menus["SkillMenu"]:setCancelWidget() self.controller.menusystem.menus["SkillMenu"]:setCancelWidget()
end end
function MenuConstructor:buildObjectMenu(character)
CharacterMenu(self.controller, "ObjectMenu", MENUPOS_X1 - 16, MENUPOS_Y)
CharacterMenu(self.controller, "MedMenu", MENUPOS_X1 - 16, MENUPOS_Y)
CharacterMenu(self.controller, "RingMenu", MENUPOS_X1 - 16, MENUPOS_Y)
CharacterMenu(self.controller, "WispMenu", MENUPOS_X1 - 16, MENUPOS_Y)
CharacterMenu(self.controller, "OtherMenu", MENUPOS_X1 - 16, MENUPOS_Y)
SubMenuWidget(self.controller, "ObjectMenu", "Médecine", "MedMenu", character)
SubMenuWidget(self.controller, "ObjectMenu", "Rings", "RingMenu", character)
SubMenuWidget(self.controller, "ObjectMenu", "Wisps", "WispMenu", character)
SubMenuWidget(self.controller, "ObjectMenu", "Autres", "OtherMenu", character)
SubMenuWidget(self.controller, "ObjectMenu", "Retour", "BaseMenu", character)
SubMenuWidget(self.controller, "MedMenu", "Retour", "ObjectMenu", character)
SubMenuWidget(self.controller, "RingMenu", "Retour", "ObjectMenu", character)
SubMenuWidget(self.controller, "WispMenu", "Retour", "ObjectMenu", character)
SubMenuWidget(self.controller, "OtherMenu", "Retour", "ObjectMenu", character)
self.controller.menusystem.menus["ObjectMenu"]:setCancelWidget()
self.controller.menusystem.menus["MedMenu"]:setCancelWidget()
self.controller.menusystem.menus["RingMenu"]:setCancelWidget()
self.controller.menusystem.menus["WispMenu"]:setCancelWidget()
self.controller.menusystem.menus["OtherMenu"]:setCancelWidget()
end
function MenuConstructor:unset( ) function MenuConstructor:unset( )
self.isActive = false self.isActive = false
end end