Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions Features/Dispel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1002,15 +1002,19 @@ local function ShowOverlayWithSecretColor(overlay, db, unit, auraInstanceID, fra
local texturePath = GRADIENT_TEXTURES[gradientStyle] or GRADIENT_TEXTURES.FULL
overlay.gradient:SetStatusBarTexture(texturePath)

-- Apply the color with baked-in alpha from curve
-- Apply the color from the curve. GetRGBA() returns a secret alpha
-- (the ColorMixin from GetAuraDispelTypeColor is secret-tainted) which
-- SetVertexColor cannot handle in the alpha position — it silently renders
-- at full opacity. Use GetRGB() for the secret-safe colour and apply the
-- base opacity via the frame's own alpha instead, folding OOR in together.
local gradientAlpha = math.min((db.dispelGradientAlpha or 0.5) * (db.dispelGradientIntensity or 1.0), 1.0)
local tex = overlay.gradient:GetStatusBarTexture()
tex:SetVertexColor(gradientColor:GetRGBA())
tex:SetVertexColor(gradientColor:GetRGB())
tex:SetBlendMode(blendMode)
-- Apply OOR alpha via SetAlphaFromBoolean
if overlay.gradient.SetAlphaFromBoolean then
overlay.gradient:SetAlphaFromBoolean(inRange, 1.0, oorDispelAlpha)
overlay.gradient:SetAlphaFromBoolean(inRange, gradientAlpha, gradientAlpha * oorDispelAlpha)
else
overlay.gradient:SetAlpha(1)
overlay.gradient:SetAlpha(gradientAlpha)
end

overlay.gradient:Show()
Expand Down
46 changes: 28 additions & 18 deletions Frames/Create.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1111,18 +1111,23 @@ function DF:CreateFrameElementsExtended(frame, db)
-- ========================================
-- ABSORB BAR
-- ========================================
frame.dfAbsorbBar = CreateFrame("StatusBar", nil, frame)
-- Parent to healthBar (not frame) so frame level tracks alongside the dispel
-- gradient (also parented to healthBar). This prevents the gradient from
-- drifting above the absorb bars when SecureGroupHeaderTemplate adjusts
-- healthBar's frame level after creation. Levels bumped to stay above
-- the gradient which sits at healthBar+2.
frame.dfAbsorbBar = CreateFrame("StatusBar", nil, frame.healthBar)
frame.dfAbsorbBar:SetStatusBarTexture("Interface\\RaidFrame\\Shield-Fill")
frame.dfAbsorbBar:SetMinMaxValues(0, 1)
frame.dfAbsorbBar:SetValue(0)
frame.dfAbsorbBar:SetFrameLevel(frame.healthBar:GetFrameLevel() + 3)
frame.dfAbsorbBar:SetFrameLevel(frame.healthBar:GetFrameLevel() + 4)
frame.dfAbsorbBar:Hide()

local absorbBg = frame.dfAbsorbBar:CreateTexture(nil, "BACKGROUND")
absorbBg:SetAllPoints()
absorbBg:SetColorTexture(0, 0, 0, 0)
frame.dfAbsorbBar.bg = absorbBg

local absorbBorder = CreateFrame("Frame", nil, frame.dfAbsorbBar, "BackdropTemplate")
absorbBorder:SetPoint("TOPLEFT", -1, 1)
absorbBorder:SetPoint("BOTTOMRIGHT", 1, -1)
Expand All @@ -1133,22 +1138,22 @@ function DF:CreateFrameElementsExtended(frame, db)
absorbBorder:SetBackdropBorderColor(0, 0, 0, 1)
absorbBorder:Hide()
frame.dfAbsorbBar.border = absorbBorder

-- ========================================
-- HEAL ABSORB BAR
-- ========================================
frame.dfHealAbsorbBar = CreateFrame("StatusBar", nil, frame)
frame.dfHealAbsorbBar = CreateFrame("StatusBar", nil, frame.healthBar)
frame.dfHealAbsorbBar:SetStatusBarTexture("Interface\\RaidFrame\\Shield-Fill")
frame.dfHealAbsorbBar:SetMinMaxValues(0, 1)
frame.dfHealAbsorbBar:SetValue(0)
frame.dfHealAbsorbBar:SetFrameLevel(frame.healthBar:GetFrameLevel() + 4)
frame.dfHealAbsorbBar:SetFrameLevel(frame.healthBar:GetFrameLevel() + 5)
frame.dfHealAbsorbBar:Hide()

local healAbsorbBg = frame.dfHealAbsorbBar:CreateTexture(nil, "BACKGROUND")
healAbsorbBg:SetAllPoints()
healAbsorbBg:SetColorTexture(0, 0, 0, 0)
frame.dfHealAbsorbBar.bg = healAbsorbBg

local healAbsorbBorder = CreateFrame("Frame", nil, frame.dfHealAbsorbBar, "BackdropTemplate")
healAbsorbBorder:SetPoint("TOPLEFT", -1, 1)
healAbsorbBorder:SetPoint("BOTTOMRIGHT", 1, -1)
Expand Down Expand Up @@ -1828,18 +1833,23 @@ function DF:CreateUnitFrame(unit, index, isRaid)
-- ========================================
-- ABSORB BAR
-- ========================================
frame.dfAbsorbBar = CreateFrame("StatusBar", nil, frame)
-- Parent to healthBar (not frame) so frame level tracks alongside the dispel
-- gradient (also parented to healthBar). This prevents the gradient from
-- drifting above the absorb bars when SecureGroupHeaderTemplate adjusts
-- healthBar's frame level after creation. Levels bumped to stay above
-- the gradient which sits at healthBar+2.
frame.dfAbsorbBar = CreateFrame("StatusBar", nil, frame.healthBar)
frame.dfAbsorbBar:SetStatusBarTexture("Interface\\RaidFrame\\Shield-Fill")
frame.dfAbsorbBar:SetMinMaxValues(0, 1)
frame.dfAbsorbBar:SetValue(0)
frame.dfAbsorbBar:SetFrameLevel(frame.healthBar:GetFrameLevel() + 3)
frame.dfAbsorbBar:SetFrameLevel(frame.healthBar:GetFrameLevel() + 4)
frame.dfAbsorbBar:Hide()

local absorbBg = frame.dfAbsorbBar:CreateTexture(nil, "BACKGROUND")
absorbBg:SetAllPoints()
absorbBg:SetColorTexture(0, 0, 0, 0)
frame.dfAbsorbBar.bg = absorbBg

-- Border for absorb bar
local absorbBorder = CreateFrame("Frame", nil, frame.dfAbsorbBar, "BackdropTemplate")
absorbBorder:SetPoint("TOPLEFT", -1, 1)
Expand All @@ -1851,22 +1861,22 @@ function DF:CreateUnitFrame(unit, index, isRaid)
absorbBorder:SetBackdropBorderColor(0, 0, 0, 1)
absorbBorder:Hide()
frame.dfAbsorbBar.border = absorbBorder

-- ========================================
-- HEAL ABSORB BAR
-- ========================================
frame.dfHealAbsorbBar = CreateFrame("StatusBar", nil, frame)
frame.dfHealAbsorbBar = CreateFrame("StatusBar", nil, frame.healthBar)
frame.dfHealAbsorbBar:SetStatusBarTexture("Interface\\RaidFrame\\Shield-Fill")
frame.dfHealAbsorbBar:SetMinMaxValues(0, 1)
frame.dfHealAbsorbBar:SetValue(0)
frame.dfHealAbsorbBar:SetFrameLevel(frame.healthBar:GetFrameLevel() + 4)
frame.dfHealAbsorbBar:SetFrameLevel(frame.healthBar:GetFrameLevel() + 5)
frame.dfHealAbsorbBar:Hide()

local healAbsorbBg = frame.dfHealAbsorbBar:CreateTexture(nil, "BACKGROUND")
healAbsorbBg:SetAllPoints()
healAbsorbBg:SetColorTexture(0, 0, 0, 0)
frame.dfHealAbsorbBar.bg = healAbsorbBg

-- Border for heal absorb bar
local healAbsorbBorder = CreateFrame("Frame", nil, frame.dfHealAbsorbBar, "BackdropTemplate")
healAbsorbBorder:SetPoint("TOPLEFT", -1, 1)
Expand Down
4 changes: 2 additions & 2 deletions Options/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7423,11 +7423,11 @@ function DF:SetupGUIPages(GUI, CreateCategory, CreateSubTab, BuildPage)
gradSize.hideOn = HideDispelOptions
local gradAlpha = gradientGroup:AddWidget(GUI:CreateSlider(self.child, L["Gradient Opacity"], 0.1, 1.0, 0.1, db, "dispelGradientAlpha", function()
InvalidateCurves()
end, function() DF:LightweightUpdateDispelOverlay() end, true), 55)
end, function() DF:InvalidateDispelColorCurve(); DF:LightweightUpdateDispelOverlay() end, true), 55)
gradAlpha.hideOn = HideDispelOptions
local gradIntensity = gradientGroup:AddWidget(GUI:CreateSlider(self.child, L["Gradient Intensity"], 0.5, 3.0, 0.1, db, "dispelGradientIntensity", function()
InvalidateCurves()
end, function() DF:LightweightUpdateDispelOverlay() end, true), 55)
end, function() DF:InvalidateDispelColorCurve(); DF:LightweightUpdateDispelOverlay() end, true), 55)
gradIntensity.hideOn = HideDispelOptions
local blendModes = { ["ADD"]= L["Glow (ADD)"], ["BLEND"]= L["Solid (BLEND)"] }
local blendDropdown = gradientGroup:AddWidget(GUI:CreateDropdown(self.child, L["Blend Mode"], blendModes, db, "dispelGradientBlendMode", function()
Expand Down