/Tukui/modules/addonskins/TinyDPS.lua

http://github.com/Asphyxia/Tukui · Lua · 32 lines · 24 code · 6 blank · 2 comment · 6 complexity · f1e253ba80180071800df1d17a9534af MD5 · raw file

  1. -- Credits to Dajova :-*
  2. local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
  3. if not IsAddOnLoaded("TinyDPS") or not C.Addon_Skins.TinyDPS then return end
  4. local TinyDPS = CreateFrame("Frame")
  5. TinyDPS:RegisterEvent("ADDON_LOADED")
  6. TinyDPS:SetScript("OnEvent", function(self, event, addon)
  7. if not addon == "TinyDPS" then return end
  8. if tdps then
  9. tdps.width = TukuiMinimap:GetWidth()
  10. tdps.spacing = 2
  11. tdps.barHeight = 14
  12. tdpsFont.name = C["media"].pixelfont
  13. tdpsFont.size = 12
  14. tdpsFont.outline = "MONOCHROMEOUTLINE"
  15. end
  16. -- need 2 anchors for some reason, ask the author of TinyDPS why -_-"
  17. tdpsPosition = {x = 0, y = -6}
  18. tdpsAnchor:SetPoint('BOTTOMLEFT',TukuiMinimap, 'BOTTOMLEFT', 0, -14)
  19. tdpsFrame:SetTemplate("Transparent", true)
  20. tdpsFrame:CreateShadow("Default")
  21. if tdpsStatusBar then
  22. 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}})
  23. tdpsStatusBar:SetStatusBarTexture(C["media"].normTex)
  24. end
  25. self:UnregisterEvent("ADDON_LOADED")
  26. end)