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
9 changes: 7 additions & 2 deletions EllesmereUIUnitFrames/EUI_UnitFrames_Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
29 changes: 25 additions & 4 deletions EllesmereUIUnitFrames/EllesmereUIUnitFrames.lua
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ local defaults = {
raidMarkerAlign = "left",
raidMarkerX = 0,
raidMarkerY = 0,
bossStackDirection = "down",
healthReverseFill = false,
},
enabledFrames = {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions EllesmereUI_Widgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down