-----------------------------------------
-- DrawBottomText
-----------------------------------------
function CUIFg:DrawBottomText()
local offset = 0
self.bottomTextBoxY0 = self.uiBottomPosY - offset
lg.draw (self.bottomTextObj, gViewport.width/2, self.bottomTextBoxY0 + 17, 0, self.bottomTextObjScale, self.bottomTextObjScale, self.bottomTextBoxWidth/2, self.bottomTextObjHeight/2)
end
-----------------------------------------
-- SetBottomText
-----------------------------------------
function CUIFg:SetBottomTextWithSize (text, size)
if (self.bottomText == "") then
CTransition:New(self, "bottomTextObjScale", 1, 0.25, 0, easing.outBack)
end
self.bottomText = text
if (self.bottomTextSize ~= size or self.bottomTextObj:getFont() ~= gCurrentFont.font) then
self.bottomTextSize = size
self.bottomTextObj:setFont(Common:GetFont(self.bottomTextSize, gCurrentFont.font))
end
self.bottomTextObj:setf(self.bottomText, self.bottomTextBoxWidth, "center")
self.bottomTextObjHeight = self.bottomTextObj:getHeight()
self.bottomTextObjPosY = self.bottomTextBoxHeight/2 - self.bottomTextObjHeight/2
end