PageRenderTime 37ms CodeModel.GetById 32ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Tukui/modules/addonskins/TinyDPS.lua

http://github.com/Asphyxia/Tukui
Lua | 32 lines | 24 code | 6 blank | 2 comment | 5 complexity | f1e253ba80180071800df1d17a9534af MD5 | raw file
 1-- Credits to Dajova :-*
 2local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
 3if not IsAddOnLoaded("TinyDPS") or not C.Addon_Skins.TinyDPS then return end
 4
 5local TinyDPS = CreateFrame("Frame")
 6TinyDPS:RegisterEvent("ADDON_LOADED")
 7TinyDPS:SetScript("OnEvent", function(self, event, addon)
 8	if not addon == "TinyDPS" then return end
 9
10	if tdps then
11		tdps.width = TukuiMinimap:GetWidth()
12		tdps.spacing = 2
13		tdps.barHeight = 14
14		tdpsFont.name = C["media"].pixelfont
15		tdpsFont.size = 12
16		tdpsFont.outline = "MONOCHROMEOUTLINE"
17	end
18	
19	-- need 2 anchors for some reason, ask the author of TinyDPS why -_-"
20	tdpsPosition = {x = 0, y = -6}
21    tdpsAnchor:SetPoint('BOTTOMLEFT',TukuiMinimap, 'BOTTOMLEFT', 0, -14)
22		
23	tdpsFrame:SetTemplate("Transparent", true)
24	tdpsFrame:CreateShadow("Default")
25	
26	if tdpsStatusBar then
27		tdpsStatusBar:SetBackdrop({bgFile = C["media"].normTex, edgeFile = C["media"].blank, tile = false, tileSize = 0, edgeSize = 1, insets = { left = 0, right = 0, top = 0, bottom = 0}})
28		tdpsStatusBar:SetStatusBarTexture(C["media"].normTex)
29	end
30	
31	self:UnregisterEvent("ADDON_LOADED")
32end)