diff --git a/EllesmereUIUnitFrames/EUI_UnitFrames_Options.lua b/EllesmereUIUnitFrames/EUI_UnitFrames_Options.lua index 6e96f594..73c383bd 100644 --- a/EllesmereUIUnitFrames/EUI_UnitFrames_Options.lua +++ b/EllesmereUIUnitFrames/EUI_UnitFrames_Options.lua @@ -8262,10 +8262,15 @@ initFrame:SetScript("OnEvent", function(self) db.profile.boss.showCastIcon = v ReloadAndUpdate() end }, - { type="slider", text="Vertical Spacing", min=20, max=200, step=1, + { type="slider", text="Vertical Spacing", min=-200, max=200, step=1, getValue=function() return db.profile.bossSpacing or 80 end, setValue=function(v) db.profile.bossSpacing = v; ReloadAndUpdate() end }) - return castRow, eh + ch + local growthRow, gh = Ww:DualRow(pp, yy - eh - ch, + { type="dropdown", text="Stack Direction", values={ up="Up", down="Down" }, order={ "up", "down" }, + getValue=function() return db.profile.boss.bossStackDirection or "down" end, + setValue=function(v) db.profile.boss.bossStackDirection = v; ReloadAndUpdate() end }, + { type="spacer" }) + return growthRow, eh + ch + gh end local function bossAfterSize(Ww, pp, yy) diff --git a/EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua b/EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua index 441a84d0..25b68fe5 100644 --- a/EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua +++ b/EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua @@ -732,6 +732,7 @@ local defaults = { raidMarkerAlign = "left", raidMarkerX = 0, raidMarkerY = 0, + bossStackDirection = "down", healthReverseFill = false, }, enabledFrames = { @@ -5343,7 +5344,12 @@ local function ReloadFrames() local prev = frames["boss" .. (bossIdx - 1)] if prev then frame:ClearAllPoints() - frame:SetPoint("TOPLEFT", prev, "TOPLEFT", 0, -bossSpacing) + local bossStackDir = db.profile.boss and db.profile.boss.bossStackDirection or "down" + if bossStackDir == "up" then + frame:SetPoint("BOTTOMLEFT", prev, "TOPLEFT", 0, bossSpacing) + else + frame:SetPoint("TOPLEFT", prev, "TOPLEFT", 0, -bossSpacing) + end end end else @@ -7843,6 +7849,7 @@ function InitializeFrames() local barHeight = (bossSettings.healthHeight or 34) + (bossSettings.powerHeight or 6) + (bossSettings.castbarHeight or 14) local gap = 10 local spacing = db.profile.bossSpacing or (barHeight + gap) + local bossStackDir = db.profile.boss and db.profile.boss.bossStackDirection or "down" for i = 1, 5 do local bossUnit = "boss" .. i local bossFrame = oUF:Spawn(bossUnit, "EllesmereUIUnitFrames_Boss" .. i) @@ -7860,7 +7867,11 @@ function InitializeFrames() local prev = frames["boss" .. (i - 1)] if prev then bossFrame:ClearAllPoints() - bossFrame:SetPoint("TOPLEFT", prev, "TOPLEFT", 0, -spacing) + if bossStackDir == "up" then + bossFrame:SetPoint("BOTTOMLEFT", prev, "TOPLEFT", 0, spacing) + else + bossFrame:SetPoint("TOPLEFT", prev, "BOTTOMLEFT", 0, -spacing) + end end end @@ -8550,6 +8561,7 @@ function SetupOptionsPanel() if EllesmereUI._unlockActive then return end if k == "boss" then local spacing = db.profile.bossSpacing or 60 + local bossStackDir = db.profile.boss and db.profile.boss.bossStackDirection or "down" -- boss1 to UIParent; chain 2..5 from the previous boss. if frames.boss1 then frames.boss1:ClearAllPoints() @@ -8560,7 +8572,11 @@ function SetupOptionsPanel() local prev = frames["boss" .. (i - 1)] if bf and prev then bf:ClearAllPoints() - bf:SetPoint("TOPLEFT", prev, "TOPLEFT", 0, -spacing) + if bossStackDir == "up" then + bf:SetPoint("BOTTOMLEFT", prev, "TOPLEFT", 0, spacing) + else + bf:SetPoint("TOPLEFT", prev, "BOTTOMLEFT", 0, -spacing) + end end end elseif k == "classPower" then @@ -8605,6 +8621,7 @@ function SetupOptionsPanel() end if k == "boss" then local spacing = db.profile.bossSpacing or 60 + local bossStackDir = db.profile.boss and db.profile.boss.bossStackDirection or "down" if frames.boss1 then local bx, by = SnapForFrame(frames.boss1, pos.x, pos.y) frames.boss1:ClearAllPoints() @@ -8615,7 +8632,11 @@ function SetupOptionsPanel() local prev = frames["boss" .. (i - 1)] if bf and prev then bf:ClearAllPoints() - bf:SetPoint("TOPLEFT", prev, "TOPLEFT", 0, -spacing) + if bossStackDir == "up" then + bf:SetPoint("BOTTOMLEFT", prev, "TOPLEFT", 0, spacing) + else + bf:SetPoint("TOPLEFT", prev, "BOTTOMLEFT", 0, -spacing) + end end end elseif k == "classPower" then diff --git a/EllesmereUI_Widgets.lua b/EllesmereUI_Widgets.lua index a5940b4f..0fb2c174 100644 --- a/EllesmereUI_Widgets.lua +++ b/EllesmereUI_Widgets.lua @@ -2702,6 +2702,11 @@ function WidgetFactory:DualRow(parent, yOffset, leftCfg, rightCfg) local function BuildHalf(region, cfg) if not cfg then return end local t = cfg.type + -- Empty half-space placeholder for dual/third rows. + if t == "spacer" then + region._control = nil + return + end -- Label (all types have one) local label = MakeFont(region, 14, nil, TEXT_WHITE_R, TEXT_WHITE_G, TEXT_WHITE_B) PP.Point(label, "LEFT", region, "LEFT", SIDE_PAD, 0)