battlesystem: font name doesn't need to be modifiable in menu system

This commit is contained in:
Kazhnuz 2019-03-31 16:53:21 +02:00
parent 99feaf2be5
commit 67ef04bcc8

View file

@ -42,7 +42,7 @@ 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 for i,v in ipairs(BaseMenu) do
CharMenuWidget(self.controller, "BaseMenu", "small", v, "", character) CharMenuWidget(self.controller, "BaseMenu", v, "", character)
end end
end end
@ -220,10 +220,10 @@ end
-- WIDGETS -- WIDGETS
-- All widgets used by the Characters menus -- All widgets used by the Characters menus
function CharMenuWidget:new(scene, menu_name, font_name, label1, label2, character) function CharMenuWidget:new(scene, menu_name, label1, label2, character)
self.character = character self.character = character
local menu = scene.menusystem.menus[menu_name] or error("menu " ..menu_name .. " doesn't exist") local menu = scene.menusystem.menus[menu_name] or error("menu " ..menu_name .. " doesn't exist")
local font = scene.assets.fonts[font_name] or error("font " ..font_name .. " doesn't exist") local font = scene.assets.fonts["small"]
CharMenuWidget.super.new(self, menu, font, label1) CharMenuWidget.super.new(self, menu, font, label1)
self.label2 = label2 or "" self.label2 = label2 or ""
end end