fix: always use fullname

Fix #50
This commit is contained in:
Kazhnuz 2020-08-23 08:53:44 +02:00
parent 5139d9727d
commit e6cf6b5761
5 changed files with 10 additions and 7 deletions

View file

@ -5,6 +5,7 @@
return { return {
name = "spinattack", name = "spinattack",
fullname = "Spin Attack",
cost = 03, cost = 03,
targetNumber = 1, -- 0 for targeting all ennemies targetNumber = 1, -- 0 for targeting all ennemies

View file

@ -1,5 +1,6 @@
return { return {
name = "spindash", name = "spindash",
fullname = "Spin Dash",
cost = 05, cost = 05,
targetNumber = 1, -- 0 for targeting all ennemies targetNumber = 1, -- 0 for targeting all ennemies
targetEnnemies = true, targetEnnemies = true,

View file

@ -3,7 +3,7 @@ local fancy = require "game.modules.menus.fancy"
local BattleMenu = fancy.FancyMenu:extend() local BattleMenu = fancy.FancyMenu:extend()
local MENUPOS_X1, MENUPOS_Y = 88, 72 local MENUPOS_X1, MENUPOS_Y = 88, 72
local MENU_WIDTH = 180-24 local MENU_WIDTH = 180-32
local MENU_ITEM_NUMBER = 6 local MENU_ITEM_NUMBER = 6
function BattleMenu:new(scene, name) function BattleMenu:new(scene, name)

View file

@ -30,11 +30,11 @@ end
function MenuConstructor:buildBaseMenu(character) function MenuConstructor:buildBaseMenu(character)
CharacterMenu(self.scene, "BaseMenu") CharacterMenu(self.scene, "BaseMenu")
widgets.ActionWidget(character, "BaseMenu", "attack") widgets.ActionWidget(character, "BaseMenu", "attack", "Attack")
self:addSubMenu("BaseMenu", "SkillMenu", "Skills") self:addSubMenu("BaseMenu", "SkillMenu", "Skills")
self:addSubMenu("BaseMenu", "ObjectMenu", "Objects") self:addSubMenu("BaseMenu", "ObjectMenu", "Objects")
widgets.ActionWidget(character, "BaseMenu", "defend") widgets.ActionWidget(character, "BaseMenu", "defend", "Defend")
widgets.ActionWidget(character, "BaseMenu", "flee") widgets.ActionWidget(character, "BaseMenu", "flee", "Flee")
end end
function MenuConstructor:set(currentCharacter) function MenuConstructor:set(currentCharacter)

View file

@ -48,9 +48,10 @@ end
-- ActionWidget -- ActionWidget
-- The basic action widget -- The basic action widget
function widgets.ActionWidget:new(character, menu_name, action) function widgets.ActionWidget:new(character, menu_name, action, label)
self.actionType = action or "" self.actionType = action or ""
widgets.ActionWidget.super.new(self, character, menu_name, action, "") local label = label or self.actionType
widgets.ActionWidget.super.new(self, character, menu_name, label, "")
end end
function widgets.ActionWidget:sendCharacterData() function widgets.ActionWidget:sendCharacterData()
@ -104,7 +105,7 @@ function widgets.SkillWidget:new(character, menu_name, skill)
end end
end end
widgets.SkillWidget.super.new(self, character, menu_name, self.skillname, "-" .. label2, "skills") widgets.SkillWidget.super.new(self, character, menu_name, self.skilldata.fullname, "-" .. label2, "skills")
end end
function widgets.SkillWidget:sendCharacterData() function widgets.SkillWidget:sendCharacterData()