annotate ui/FontString.lua @ 51:6f1bb8fcf64d v18

AskMrRobot.toc - Added line for new SettingsTab file AskMrRobotUi.lua - Added code for new Settings menu amr-constants.lua - Added instance IDs for all WoD 6.0 5-mans and Raids. - Removed legacy SoO IDs. config.lua - Removed "Interface/Addons" options area, migrated all settings to main addon window. localization/localization.en.lua - Added new strings for new Settings tab and new Raid auto-logging ui/CombatLogTab.lua - Removed legacy SoO code - Added auto-logging settings for Highmaul and Blackrock Foundry. ui/SettingsTab.lua - new main window tab for Minimap and Auction House settings options
author TuhMuffinMan <TuhMuffinMan>
date Fri, 28 Nov 2014 13:09:52 -0600
parents e77e01abce98
children
rev   line source
yellowfive@11 1 local _, AskMrRobot = ...
yellowfive@11 2
yellowfive@11 3 -- initialize the Frame class (inherit from a dummy frame)
yellowfive@11 4 AskMrRobot.FontString = AskMrRobot.inheritsFrom(AskMrRobot.Frame:new():CreateFontString(nil, "ARTWORK", "GameFontNormal"))
yellowfive@11 5
yellowfive@11 6 -- Frame contructor
yellowfive@11 7 function AskMrRobot.FontString:new(parentFrame, name, layer, style, fontSize)
yellowfive@11 8
yellowfive@11 9 local o = parentFrame:CreateFontString(name, layer, style) -- create a new frame (if one isn't supplied)
yellowfive@11 10
yellowfive@11 11 -- use the fontstring class
yellowfive@11 12 setmetatable(o, { __index = AskMrRobot.FontString })
yellowfive@11 13
yellowfive@11 14 if fontSize then
yellowfive@11 15 o:SetFontSize(fontSize)
yellowfive@11 16 end
yellowfive@11 17
yellowfive@11 18 return o
yellowfive@11 19 end
yellowfive@11 20
yellowfive@11 21 function AskMrRobot.FontString:SetFontSize(fontSize)
yellowfive@11 22 local file, _, flags = self:GetFont()
yellowfive@11 23 self:SetFont(file, fontSize, flags)
yellowfive@11 24 end
yellowfive@11 25
adam@17 26 function AskMrRobot.FontString:IncreaseFontSize(add)
adam@17 27 local file, fontSize, flags = self:GetFont()
adam@17 28 self:SetFont(file, fontSize + add, flags)
adam@17 29 end
adam@17 30
yellowfive@11 31 function AskMrRobot.SetFontSize(fontString, fontSize)
yellowfive@11 32 local file, _, flags = fontString:GetFont()
yellowfive@11 33 fontString:SetFont(file, fontSize, flags)
yellowfive@11 34 end