main.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. local me = ...
  2. local plugin = BigWigs:GetPlugin("Bars")
  3. local db = plugin.db.profile
  4. --local colors = BigWigs:GetPlugin("Colors")
  5. local alias = {
  6. ["Energía estática sanguina"] = "CONO" -- Uldir - Taloc
  7. }
  8. -- "bars" l&f
  9. -- We need to setup the bars itself, with a transparent color
  10. local function style(bar)
  11. bar.candyBarLabel:SetJustifyH("LEFT")
  12. bar.candyBarLabel:ClearAllPoints()
  13. bar.candyBarLabel:Point("LEFT", bar, "LEFT", db.BigWigsAnchor_height + 4, 0)
  14. bar.candyBarDuration:SetJustifyH("LEFT")
  15. bar.candyBarDuration:ClearAllPoints()
  16. bar.candyBarDuration:Point("RIGHT", bar, "LEFT", -3, 0)
  17. end
  18. plugin:RegisterBarStyle("GioNoBars", {
  19. apiVersion = 1,
  20. version = 1,
  21. ApplyStyle = style,
  22. GetStyleName = function() return "Gio No Bars" end,
  23. })
  24. local function styleCreated(msg, plugin, bar, module, key, text, time, icon, isApprox)
  25. --DevTools_Dump(colors:GetColor("barText", module, key))
  26. if alias[text] ~= nil then
  27. bar:SetLabel(alias[text] .." (".. text ..")")
  28. end
  29. end
  30. local function styleEmphasized(msg, plugin, bar)
  31. bar:SetTextColor(1, 0, 0) -- this should be fixed
  32. --local r, g, b, a = bar.candyBarLabel:GetTextColor()
  33. --print(r)
  34. --print(g)
  35. --print(b)
  36. --print(a)
  37. end
  38. BigWigsLoader.RegisterMessage(me, "BigWigs_BarCreated", styleCreated)
  39. BigWigsLoader.RegisterMessage(me, "BigWigs_BarEmphasized", styleEmphasized)