Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
### Improvements

* (Pinned Frames) Pinned frame settings are now **global per party/raid mode** and no longer saved into auto layouts — a raid auto layout only controls whether each pinned set is **shown** for that layout. This removes the stale/blank pinned data and editor mismatches that came from pinned settings being stored per-layout, and pinned edits now take effect live. (by Krathe)
* (Out of Range) The out-of-range text fade is now a single **Text Alpha** control that dims the whole Text Designer overlay together, replacing the old per-element Name/Health alpha sliders that no longer did anything once the Text Designer took over text rendering. (by Krathe)

### Bug Fixes

Expand Down
2 changes: 2 additions & 0 deletions Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,7 @@ DF.PartyDefaults = {
oorMissingHealthAlpha = 0.20000000298023,
oorMyBuffIndicatorAlpha = 0,
oorNameTextAlpha = 1,
oorTextAlpha = 0.55, -- unified OOR alpha for ALL Text Designer text (replaces the per-element name/health text alphas, which are legacy)
oorPowerBarAlpha = 0.20000000298023,
oorTargetedSpellAlpha = 0.5,
oorAuraDesignerAlpha = 0.20000000298023,
Expand Down Expand Up @@ -3260,6 +3261,7 @@ DF.RaidDefaults = {
oorMissingHealthAlpha = 0.20000000298023,
oorMyBuffIndicatorAlpha = 0,
oorNameTextAlpha = 1,
oorTextAlpha = 0.55, -- unified OOR alpha for ALL Text Designer text (replaces the per-element name/health text alphas, which are legacy)
oorPowerBarAlpha = 0.20000000298023,
oorTargetedSpellAlpha = 0.5,
oorAuraDesignerAlpha = 0.20000000298023,
Expand Down
25 changes: 25 additions & 0 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3509,6 +3509,25 @@ local function ZeroBuffDebuffBorderInset(profile)
end
end

-- Fold the legacy per-element OOR name-text alpha into the unified oorTextAlpha.
-- The Text Designer now renders all unit text, so a single OOR "Text Alpha" dims
-- every TD element out of range. Carry the user's old name-text value only when
-- they changed it from the prior default (1); default-config users get the new
-- oorTextAlpha default instead. Per-profile guarded so later oorTextAlpha edits stick.
function DF:MigrateOORTextAlpha()
if not DandersFramesDB_v2 or not DandersFramesDB_v2.profiles then return end
for _, profile in pairs(DandersFramesDB_v2.profiles) do
if type(profile) == "table" and not profile._oorTextAlphaV1 then
for _, modeKey in ipairs({ "party", "raid" }) do
local m = profile[modeKey]
if type(m) == "table" and m.oorNameTextAlpha ~= nil and m.oorNameTextAlpha ~= 1 then
m.oorTextAlpha = m.oorNameTextAlpha
end
end
profile._oorTextAlphaV1 = true
end
end
end
-- One-shot per-profile, two independently-guarded steps so a profile already
-- through step 1 still receives step 2. Both steps are value-idempotent.
function DF:MigrateBorderInsetFold()
Expand Down Expand Up @@ -5304,6 +5323,12 @@ DF._MainEventDispatcher = function(self, event, arg1)
DF:MigrateBorderInsetFold()
end

-- Fold the legacy OOR name-text alpha into the unified oorTextAlpha
-- (Text Designer now renders all text). Per-profile guarded.
if DF.MigrateOORTextAlpha then
DF:MigrateOORTextAlpha()
end

-- CRITICAL: Update power bars now that unit data is available
-- At ADDON_LOADED, UnitPower() etc may return 0 before player is loaded
-- Power bar updates don't require combat protection
Expand Down
1 change: 1 addition & 0 deletions ExportCategories.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,7 @@ DF.ExportCategories = {
"oorPowerBarAlpha",
"oorAurasAlpha",
"oorNameTextAlpha",
"oorTextAlpha",
"oorIconsAlpha",
"oorDispelOverlayAlpha",
"oorDefensiveIconAlpha",
Expand Down
1 change: 1 addition & 0 deletions Locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,7 @@ L["Test mode disabled."] = true
L["Test mode enabled."] = true
L["Test mode ended — entering combat."] = true
L["Text"] = true
L["Text Alpha"] = true
L["Text Color"] = true
L["Text Colors:"] = true
L["Text Designer"] = true
Expand Down
12 changes: 6 additions & 6 deletions Options/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -772,12 +772,12 @@ function DF:SetupGUIPages(GUI, CreateCategory, CreateSubTab, BuildPage)
local oorBorder = oorGroup:AddWidget(GUI:CreateSlider(self.child, L["Border Alpha"], 0.0, 1.0, 0.05, db, "oorBorderAlpha", nil, function() DF:RefreshAllVisibleFrames() end, true), 55)
oorBorder.hideOn = HideOOROptions

local oorName = oorGroup:AddWidget(GUI:CreateSlider(self.child, L["Name Text Alpha"], 0.0, 1.0, 0.05, db, "oorNameTextAlpha", nil, function() DF:RefreshAllVisibleFrames() end, true), 55)
oorName.hideOn = HideOOROptions

local oorHealthText = oorGroup:AddWidget(GUI:CreateSlider(self.child, L["Health Text Alpha"], 0.0, 1.0, 0.05, db, "oorHealthTextAlpha", nil, function() DF:RefreshAllVisibleFrames() end, true), 55)
oorHealthText.hideOn = HideOOROptions
-- Unified Text Alpha: the Text Designer now renders all unit text, so a
-- single OOR alpha dims every TD text element (name/health/power/custom)
-- out of range — replacing the old per-element Name/Health text alphas.
local oorText = oorGroup:AddWidget(GUI:CreateSlider(self.child, L["Text Alpha"], 0.0, 1.0, 0.05, db, "oorTextAlpha", nil, function() DF:RefreshAllVisibleFrames() end, true), 55)
oorText.hideOn = HideOOROptions

local oorAuras = oorGroup:AddWidget(GUI:CreateSlider(self.child, L["Auras Alpha"], 0.0, 1.0, 0.05, db, "oorAurasAlpha", nil, function() DF:RefreshAllVisibleFrames() end, true), 55)
oorAuras.hideOn = HideOOROptions

Expand Down
3 changes: 3 additions & 0 deletions Profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ function DF:SetProfile(name)
if DF.MigrateBorderInsetFold then
DF:MigrateBorderInsetFold()
end
if DF.MigrateOORTextAlpha then
DF:MigrateOORTextAlpha()
end

-- Apply the profile — runtime state is already clear so the proxy reads
-- the new profile directly with no stale overlay
Expand Down
28 changes: 28 additions & 0 deletions TextDesigner/Render.lua
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,34 @@ function Render:UpdateFrame(frame, tdDB, source, hint, isPreview)
end
end
end

-- Out-of-range fade (element-specific OOR mode). TD now owns the unit's
-- text, so the unified OOR "Text Alpha" dims the whole TD overlay — every
-- element at once — while the unit is out of range. SetAlphaFromBoolean is
-- secret-safe (dfInRange may be a secret boolean on non-healer specs in
-- Midnight). When oorEnabled is off, the frame-level OOR fade cascades to
-- the overlay as a child, so leave it at full alpha here. Test frames are
-- included (dfIsTestFrame): TestMode sets frame.dfInRange from the test OOR
-- state, so the preview shows the same fade. The Options mock preview
-- (isPreview but not a test frame) is skipped — it has no range state.
if (not isPreview or frame.dfIsTestFrame) and frame.unit and frame._tdOverlay then
local fdb = DF:GetFrameDB(frame)
local ov = frame._tdOverlay
if fdb and fdb.oorEnabled then
local inRange = frame.dfInRange
if not (issecretvalue and issecretvalue(inRange)) and inRange == nil then
inRange = true
end
local oorAlpha = fdb.oorTextAlpha or 0.55
if ov.SetAlphaFromBoolean then
ov:SetAlphaFromBoolean(inRange, 1, oorAlpha)
else
ov:SetAlpha(inRange and 1 or oorAlpha)
end
else
ov:SetAlpha(1)
end
end
end

-- Tears down all FontStrings on a frame (mode switch, profile change).
Expand Down