Refonte pour utiliser le systeme de GUI #112

Merged
kazhnuz merged 102 commits from feat/gui into master 2022-01-06 19:15:16 +01:00
Showing only changes of commit 44781ba325 - Show all commits

View file

@ -31,13 +31,15 @@ TextMenu.baseWidgets = require "birb.modules.gui.textmenu.widgets"
local BASE_PADDING = 8
function TextMenu:new(name, font, x, y, w, slotNumber, padding)
function TextMenu:new(name, font, x, y, w, slotNumber, padding, lineSize)
lineSize = lineSize or 1
self:setFont(font)
self.lineHeight = self.font:getHeight() * lineSize
self.name = name
local h = self.font:getHeight() * slotNumber
self.padding = padding or BASE_PADDING
self:setSelectedColor(1,1,1)
TextMenu.super.new(self, name, x, y, w, h, slotNumber)
TextMenu.super.new(self, name, x, y, w, (self.lineHeight * slotNumber), slotNumber)
end
function TextMenu:setFont(fontName)