Skip to content

Commit 1996e49

Browse files
committed
[Layout] Improve Boss Frames Position
1 parent 436651e commit 1996e49

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

Layout.lua

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,18 +786,38 @@ function PlexusLayout:PostEnable()
786786
end
787787
end
788788
end
789+
789790
local previous = nil
791+
local columnTop = nil
792+
local bossCount = 0
793+
790794
for _, unitid in ipairs(OrderedUnits) do
791795
local frame = self[unitid .. "Frame"]
792796
if frame then
793797
frame:ClearAllPoints()
798+
794799
if not previous then
795-
-- First frame anchors to PlexusLayoutFrame
800+
-- Column 1: Focus
796801
frame:SetPoint("TOPLEFT", PlexusLayoutFrame, "TOPRIGHT", 0, 0)
802+
columnTop = frame
803+
804+
elseif unitid:match("^boss") then
805+
bossCount = bossCount + 1
806+
807+
-- Boss1 starts Column 2; Boss6 starts Column 3
808+
if bossCount == 1 or bossCount == 6 then
809+
frame:SetPoint("TOPLEFT", columnTop, "TOPRIGHT", 20, 0)
810+
columnTop = frame
811+
else
812+
-- Boss2–5 and Boss7–10 stack under previous boss
813+
frame:SetPoint("TOPLEFT", previous, "BOTTOMLEFT", 0, -4)
814+
end
815+
797816
else
798-
-- Subsequent frames anchor to the previous frame
817+
-- Any non-boss frames stack normally
799818
frame:SetPoint("TOPLEFT", previous, "BOTTOMLEFT", 0, -4)
800819
end
820+
801821
previous = frame
802822
end
803823
end

0 commit comments

Comments
 (0)