diff --git a/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars.lua b/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars.lua index f5207ac..7dec83e 100644 --- a/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars.lua +++ b/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars.lua @@ -69,8 +69,8 @@ local function CreateAuraBar(oUF, anchor) local auraBarParent = oUF.AuraBars local frame = CreateFrame("Frame", nil, auraBarParent) - frame:Height(auraBarParent.auraBarHeight or 20) - frame:Width((auraBarParent.auraBarWidth or auraBarParent:GetWidth()) - (frame:GetHeight() + (auraBarParent.gap or 0))) + frame:SetHeight(auraBarParent.auraBarHeight or 20) + frame:SetWidth((auraBarParent.auraBarWidth or auraBarParent:GetWidth()) - (frame:GetHeight() + (auraBarParent.gap or 0))) frame.anchor = anchor -- the main bar @@ -97,7 +97,7 @@ local function CreateAuraBar(oUF, anchor) local spark = statusBar:CreateTexture(nil, "OVERLAY", nil) spark:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]]) - spark:Width(12) + spark:SetWidth(12) spark:SetBlendMode("ADD") spark:SetPoint("CENTER", statusBar:GetStatusBarTexture(), "RIGHT") statusBar.spark = spark @@ -121,10 +121,10 @@ local function CreateAuraBar(oUF, anchor) else statusBar.spelltime:SetFont(auraBarParent.spellTimeFont or [[Fonts\FRIZQT__.TTF]], auraBarParent.spellTimeSize or 10) end - statusBar.spelltime:SetTextColor(1 ,1, 1) - statusBar.spelltime:SetJustifyH"RIGHT" - statusBar.spelltime:SetJustifyV"CENTER" - statusBar.spelltime:SetPoint"RIGHT" + statusBar.spelltime:SetTextColor(1, 1, 1) + statusBar.spelltime:SetJustifyH("RIGHT") + statusBar.spelltime:SetJustifyV("CENTER") + statusBar.spelltime:SetPoint("RIGHT", 0, 0) statusBar.spellname = statusBar:CreateFontString(nil, "ARTWORK") if auraBarParent.spellNameObject then @@ -133,9 +133,9 @@ local function CreateAuraBar(oUF, anchor) statusBar.spellname:SetFont(auraBarParent.spellNameFont or [[Fonts\FRIZQT__.TTF]], auraBarParent.spellNameSize or 10) end statusBar.spellname:SetTextColor(1, 1, 1) - statusBar.spellname:SetJustifyH"LEFT" - statusBar.spellname:SetJustifyV"CENTER" - statusBar.spellname:SetPoint"LEFT" + statusBar.spellname:SetJustifyH("LEFT") + statusBar.spellname:SetJustifyV("CENTER") + statusBar.spellname:SetPoint("LEFT", 0, 0) statusBar.spellname:SetPoint("RIGHT", statusBar.spelltime, "LEFT") if auraBarParent.PostCreateBar then @@ -288,7 +288,7 @@ local function Update(self, event, unit) end for index = 1 , lastAuraIndex do - if auraBars:GetWidth() == 0 then break end + -- if auraBars:GetWidth() == 0 then break end local aura = auras[index] local frame = bars[index] @@ -333,7 +333,7 @@ local function Update(self, event, unit) bar.icon:SetTexture(bar.aura.icon) - bar.spellname:SetText(bar.aura.count > 1 and format("%s [%d]", bar.aura.name, bar.aura.count) or bar.aura.name) + -- bar.spellname:SetText(bar.aura.count > 1 and format("%s [%d]", bar.aura.name, bar.aura.count) or bar.aura.name) bar.spelltime:SetText(not bar.noTime and FormatTime(bar.aura.expirationTime-GetTime())) -- Colour bars @@ -370,7 +370,8 @@ end local function Enable(self) if self.AuraBars then - self:RegisterEvent("PLAYER_AURAS_CHANGED", Update) + self:RegisterEvent("PLAYER_AURAS_CHANGED") + self:SetScript("OnEvent", function() Update(self, event, "player") end) self.AuraBars:SetHeight(1) self.AuraBars.bars = self.AuraBars.bars or {} self.AuraBars.SetAnchors = SetAnchors diff --git a/ElvUI/Modules/UnitFrames/Elements/AuraBars.lua b/ElvUI/Modules/UnitFrames/Elements/AuraBars.lua index ca42e6f..06c1756 100644 --- a/ElvUI/Modules/UnitFrames/Elements/AuraBars.lua +++ b/ElvUI/Modules/UnitFrames/Elements/AuraBars.lua @@ -24,7 +24,7 @@ function UF:Construct_AuraBars() E:SetTemplate(self, "Default", nil, nil, UF.thinBorders, true) local inset = UF.thinBorders and E.mult or nil - bar:SetInside(self, inset, inset) + E:SetInside(bar, self, inset, inset) UF["statusbars"][bar] = true UF:Update_StatusBar(bar) @@ -34,12 +34,12 @@ function UF:Construct_AuraBars() UF:Update_FontString(bar.spellname) bar.spellname:ClearAllPoints() - bar.spellname:Point("LEFT", bar, "LEFT", 2, 0) - bar.spellname:Point("RIGHT", bar.spelltime, "LEFT", -4, 0) - bar.spellname:SetWordWrap(false) + E:Point(bar.spellname, "LEFT", bar, "LEFT", 2, 0) + E:Point(bar.spellname, "RIGHT", bar.spelltime, "LEFT", -4, 0) + -- bar.spellname:SetWordWrap(false) - bar.iconHolder:SetTemplate("Default", nil, nil, UF.thinBorders, true) - bar.icon:SetInside(bar.iconHolder, inset, inset) + E:SetTemplate(bar.iconHolder, "Default", nil, nil, UF.thinBorders, true) + E:SetInside(bar.icon, bar.iconHolder, inset, inset) bar.icon:SetDrawLayer("OVERLAY") bar.bg = bar:CreateTexture(nil, "BORDER") @@ -255,11 +255,11 @@ function UF:ColorizeAuraBars() if not frame:IsVisible() then break end local spellName = frame.statusBar.aura.name local spellID = frame.statusBar.aura.spellID - local colors = E.global.unitframe.AuraBarColors[spellID] or E.global.unitframe.AuraBarColors[tostring(spellID)] or E.global.unitframe.AuraBarColors[spellName] + -- local colors = E.global.unitframe.AuraBarColors[spellID] or E.global.unitframe.AuraBarColors[tostring(spellID)] or E.global.unitframe.AuraBarColors[spellName] - if E.db.unitframe.colors.auraBarTurtle and (E.global.unitframe.aurafilters.TurtleBuffs.spells[spellID] or E.global.unitframe.aurafilters.TurtleBuffs.spells[spellName]) and not colors then - colors = E.db.unitframe.colors.auraBarTurtleColor - end + -- if E.db.unitframe.colors.auraBarTurtle and (E.global.unitframe.aurafilters.TurtleBuffs.spells[spellID] or E.global.unitframe.aurafilters.TurtleBuffs.spells[spellName]) and not colors then + -- colors = E.db.unitframe.colors.auraBarTurtleColor + -- end if colors then frame.statusBar:SetStatusBarColor(colors.r, colors.g, colors.b) @@ -275,7 +275,7 @@ function UF:ColorizeAuraBars() UF:ToggleTransparentStatusBar(false, frame.statusBar, frame.statusBar.bg, nil, true) end - if(UF.db.colors.transparentAurabars) then + if UF.db.colors.transparentAurabars then local _, _, _, alpha = frame:GetBackdropColor() if colors then frame:SetBackdropColor(colors.r * 0.58, colors.g * 0.58, colors.b * 0.58, alpha)