Refonte pour utiliser le systeme de GUI #112
1 changed files with 5 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue