Gio_BigWigs/main.lua

48 lines
1.4 KiB
Lua
Raw Permalink Normal View History

2018-07-28 09:58:46 +00:00
2018-07-28 16:54:38 +00:00
local me = ...
2018-07-28 09:58:46 +00:00
local plugin = BigWigs:GetPlugin("Bars")
local db = plugin.db.profile
2018-08-12 00:20:44 +00:00
--local colors = BigWigs:GetPlugin("Colors")
local alias = {
["Energía estática sanguina"] = "CONO" -- Uldir - Taloc
}
2018-07-28 09:58:46 +00:00
2018-07-28 16:54:38 +00:00
-- "bars" l&f
2018-08-12 00:20:44 +00:00
-- We need to setup the bars itself, with a transparent color
local function style(bar)
2018-07-28 09:58:46 +00:00
bar.candyBarLabel:SetJustifyH("LEFT")
bar.candyBarLabel:ClearAllPoints()
bar.candyBarLabel:Point("LEFT", bar, "LEFT", db.BigWigsAnchor_height + 4, 0)
bar.candyBarDuration:SetJustifyH("LEFT")
bar.candyBarDuration:ClearAllPoints()
2018-07-28 16:54:38 +00:00
bar.candyBarDuration:Point("RIGHT", bar, "LEFT", -3, 0)
2018-07-28 09:58:46 +00:00
end
plugin:RegisterBarStyle("GioNoBars", {
apiVersion = 1,
version = 1,
ApplyStyle = style,
GetStyleName = function() return "Gio No Bars" end,
})
2018-07-28 16:54:38 +00:00
2018-08-12 00:20:44 +00:00
local function styleCreated(msg, plugin, bar, module, key, text, time, icon, isApprox)
--DevTools_Dump(colors:GetColor("barText", module, key))
if alias[text] ~= nil then
bar:SetLabel(alias[text] .." (".. text ..")")
end
end
2018-07-28 16:54:38 +00:00
local function styleEmphasized(msg, plugin, bar)
2018-08-12 00:20:44 +00:00
bar:SetTextColor(1, 0, 0) -- this should be fixed
--local r, g, b, a = bar.candyBarLabel:GetTextColor()
--print(r)
--print(g)
--print(b)
--print(a)
2018-07-28 16:54:38 +00:00
end
2018-08-12 00:20:44 +00:00
BigWigsLoader.RegisterMessage(me, "BigWigs_BarCreated", styleCreated)
2018-07-28 16:54:38 +00:00
BigWigsLoader.RegisterMessage(me, "BigWigs_BarEmphasized", styleEmphasized)