X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/bfc00e5a5dbe35130486f25d90ca65ec8f8f1924..d288be9572db6130f726d2b0dcd70b9067ddc403:/Indicators.lua?ds=sidebyside diff --git a/Indicators.lua b/Indicators.lua index 7858b4b..ce916a6 100644 --- a/Indicators.lua +++ b/Indicators.lua @@ -18,7 +18,7 @@ local _; -- global functions used every update local GetTime = GetTime; local UnitAura = UnitAura; -local UnitIsUnit = UnitIsUnit; +local UnitIsPlayer = UnitIsPlayer; local UnitIsConnected = UnitIsConnected; local UnitIsDeadOrGhost = UnitIsDeadOrGhost; local CompactRaidFrameContainer_ApplyToFrames = CompactRaidFrameContainer_ApplyToFrames; @@ -28,10 +28,6 @@ local centerAuras = { "Power Word: Shield" }; -local function dPrint(s) - DEFAULT_CHAT_FRAME:AddMessage("Indicators: ".. tostring(s)); -end - local function configureIndicators(frame) local frameName = frame:GetName(); if not f[frameName] then return end @@ -40,10 +36,11 @@ local function configureIndicators(frame) local font = media and media:Fetch('font', config.indicatorFont) or STANDARD_TEXT_FONT; for pos, ind in pairs(f[frameName]) do ind.text:SetFont(font, config[pos]["textSize"]); - ind.text:SetTextColor(unpack(config[pos]["color"])); + ind.text:SetTextColor(unpack(config[pos]["textColor"])); ind.icon:SetWidth(config[pos]["iconSize"]); ind.icon:SetHeight(config[pos]["iconSize"]); ind.icon:SetTexture(DEFAULT_ICON); + ind.icon:SetVertexColor(unpack(config[pos]["iconColor"])); if config[pos]["showIcon"] then ind.icon:Show(); else @@ -83,7 +80,7 @@ local function getAuras(unit) aura.spellId = spellId; aura.count = count; aura.expires = expires; - aura.mine = UnitIsUnit(caster, "player"); + aura.mine = UnitIsPlayer(caster); aura.icon = icon; aura.debuffType = debuffType; table.insert(unitAuras, aura); @@ -136,8 +133,6 @@ local function updateIndicators(frame) -- show icon TODO coloring ind.icon:SetTexture(found.icon); end - -- TODO make show text into general setting - -- under which you can select what text to show if config.showText then -- show text local text;