-
Notifications
You must be signed in to change notification settings - Fork 1
/
Pawksickles.lua
29 lines (23 loc) · 1.28 KB
/
Pawksickles.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
local kName = 'Pawksickles'
local Pawksickles = {}
local EventMgr = GetEventManager()
local CBM = CALLBACK_MANAGER
local LMP = LibStub( 'LibMediaProvider-1.0' )
if ( not LMP ) then return end
LMP:Register( 'font', 'DejaVu Sans', [[Pawksickles/fonts/dejavusans.ttf]] )
LMP:Register( 'font', 'DejaVu Sans Bold', [[Pawksickles/fonts/dejavusans-bold.ttf]] )
LMP:Register( 'font', 'DejaVu Sans BoldOblique', [[Pawksickles/fonts/dejavusans-boldoblique.ttf]] )
LMP:Register( 'font', 'DejaVu Sans Oblique', [[Pawksickles/fonts/dejavusans-oblique.ttf]] )
LMP:Register( 'font', 'DejaVu Sans Mono', [[Pawksickles/fonts/dejavusansmono.ttf]] )
LMP:Register( 'font', 'DejaVu Serif', [[Pawksickles/fonts/dejavuserif.ttf]] )
function Pawksickles:OnLoaded( event, addon )
if ( addon ~= kName ) then
return
end
CBM:RegisterCallback( 'PAWKSICKLES_FONT_CHANGED', function( ... ) self:SetFont( ... ) end )
CBM:FireCallbacks( 'PAWKSICKLES_LOADED' )
end
function Pawksickles:SetFont( object, font )
_G[ object ]:SetFont( font )
end
EventMgr:RegisterForEvent( 'Pawksickles', EVENT_ADD_ON_LOADED, function( ... ) Pawksickles:OnLoaded( ... ) end )