Mercurial > wow > askmrrobot
view ui/FontString.lua @ 33:4ba69d2ee252 v9
fixed bug with gem changes not appearing sometimes, mainWindow crash on
startup, lua error for unknown item tooltips
author | yellowfive |
---|---|
date | Sat, 18 Oct 2014 18:13:55 -0700 |
parents | e77e01abce98 |
children |
line wrap: on
line source
local _, AskMrRobot = ... -- initialize the Frame class (inherit from a dummy frame) AskMrRobot.FontString = AskMrRobot.inheritsFrom(AskMrRobot.Frame:new():CreateFontString(nil, "ARTWORK", "GameFontNormal")) -- Frame contructor function AskMrRobot.FontString:new(parentFrame, name, layer, style, fontSize) local o = parentFrame:CreateFontString(name, layer, style) -- create a new frame (if one isn't supplied) -- use the fontstring class setmetatable(o, { __index = AskMrRobot.FontString }) if fontSize then o:SetFontSize(fontSize) end return o end function AskMrRobot.FontString:SetFontSize(fontSize) local file, _, flags = self:GetFont() self:SetFont(file, fontSize, flags) end function AskMrRobot.FontString:IncreaseFontSize(add) local file, fontSize, flags = self:GetFont() self:SetFont(file, fontSize + add, flags) end function AskMrRobot.SetFontSize(fontString, fontSize) local file, _, flags = fontString:GetFont() fontString:SetFont(file, fontSize, flags) end