From a23e38fe3108d6f69c6d9d567307fb99e02f21b4 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 31 Mar 2019 17:11:32 +0200 Subject: [PATCH] battlesystem: stop using a list to generate the main menu --- .../scenes/battlesystem/controller/menu.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/controller/menu.lua b/sonic-radiance.love/scenes/battlesystem/controller/menu.lua index 74aec2e..7287ba0 100644 --- a/sonic-radiance.love/scenes/battlesystem/controller/menu.lua +++ b/sonic-radiance.love/scenes/battlesystem/controller/menu.lua @@ -7,8 +7,6 @@ local CharacterMenu = ListBox:extend() local CharMenuWidget = Widget.Text:extend() local SubMenuWidget = CharMenuWidget:extend() -local BaseMenu = {"attack", "techs", "object", "defend", "flee", "back"} - local MENUPOS_X1, MENUPOS_X2, MENUPOS_Y = 32, 32, 110 local MENU_WIDTH, MENU_ITEM_HEIGHT = 112, 17 local MENU_ITEM_NUMBER = 6 @@ -31,9 +29,12 @@ end function MenuConstructor:buildBaseMenu(character) CharacterMenu(self.controller, "BaseMenu", MENUPOS_X1 - 16, MENUPOS_Y) - for i,v in ipairs(BaseMenu) do - CharMenuWidget(self.controller, "BaseMenu", v, "", character) - end + CharMenuWidget(self.controller, "BaseMenu", "Attaquer", "", character) + CharMenuWidget(self.controller, "BaseMenu", "Techniques", "", character) + 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() end