battlesystem: stop using a list to generate the main menu
This commit is contained in:
parent
6b57d4ccce
commit
a23e38fe31
1 changed files with 6 additions and 5 deletions
|
@ -7,8 +7,6 @@ local CharacterMenu = ListBox:extend()
|
||||||
local CharMenuWidget = Widget.Text:extend()
|
local CharMenuWidget = Widget.Text:extend()
|
||||||
local SubMenuWidget = CharMenuWidget:extend()
|
local SubMenuWidget = CharMenuWidget:extend()
|
||||||
|
|
||||||
local BaseMenu = {"attack", "techs", "object", "defend", "flee", "back"}
|
|
||||||
|
|
||||||
local MENUPOS_X1, MENUPOS_X2, MENUPOS_Y = 32, 32, 110
|
local MENUPOS_X1, MENUPOS_X2, MENUPOS_Y = 32, 32, 110
|
||||||
local MENU_WIDTH, MENU_ITEM_HEIGHT = 112, 17
|
local MENU_WIDTH, MENU_ITEM_HEIGHT = 112, 17
|
||||||
local MENU_ITEM_NUMBER = 6
|
local MENU_ITEM_NUMBER = 6
|
||||||
|
@ -31,9 +29,12 @@ 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)
|
||||||
for i,v in ipairs(BaseMenu) do
|
CharMenuWidget(self.controller, "BaseMenu", "Attaquer", "", character)
|
||||||
CharMenuWidget(self.controller, "BaseMenu", v, "", character)
|
CharMenuWidget(self.controller, "BaseMenu", "Techniques", "", character)
|
||||||
end
|
CharMenuWidget(self.controller, "BaseMenu", "Objets", "", character)
|
||||||
|
CharMenuWidget(self.controller, "BaseMenu", "Défendre", "", character)
|
||||||
|
CharMenuWidget(self.controller, "BaseMenu", "Fuite", "", character)
|
||||||
|
CharMenuWidget(self.controller, "BaseMenu", "Retour", "", character)
|
||||||
|
|
||||||
self.controller.menusystem.menus["BaseMenu"]:setCancelWidget()
|
self.controller.menusystem.menus["BaseMenu"]:setCancelWidget()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue