Mercurial > wow > askmrrobot
comparison ui/FontString.lua @ 11:ece9167c0d1c v1.2.14.0
Localization support, combat log features (wipe command, aura/pet tracking, and realm detection).
author | yellowfive |
---|---|
date | Thu, 10 Jul 2014 12:24:59 -0700 |
parents | |
children | e77e01abce98 |
comparison
equal
deleted
inserted
replaced
10:ef8b45e96b08 | 11:ece9167c0d1c |
---|---|
1 local _, AskMrRobot = ... | |
2 | |
3 -- initialize the Frame class (inherit from a dummy frame) | |
4 AskMrRobot.FontString = AskMrRobot.inheritsFrom(AskMrRobot.Frame:new():CreateFontString(nil, "ARTWORK", "GameFontNormal")) | |
5 | |
6 -- Frame contructor | |
7 function AskMrRobot.FontString:new(parentFrame, name, layer, style, fontSize) | |
8 | |
9 local o = parentFrame:CreateFontString(name, layer, style) -- create a new frame (if one isn't supplied) | |
10 | |
11 -- use the fontstring class | |
12 setmetatable(o, { __index = AskMrRobot.FontString }) | |
13 | |
14 if fontSize then | |
15 o:SetFontSize(fontSize) | |
16 end | |
17 | |
18 return o | |
19 end | |
20 | |
21 function AskMrRobot.FontString:SetFontSize(fontSize) | |
22 local file, _, flags = self:GetFont() | |
23 self:SetFont(file, fontSize, flags) | |
24 end | |
25 | |
26 function AskMrRobot.SetFontSize(fontString, fontSize) | |
27 local file, _, flags = fontString:GetFont() | |
28 fontString:SetFont(file, fontSize, flags) | |
29 end |