Skip to content

Commit 350efe3

Browse files
committed
Boss: Add Spacing into GUI
1 parent cd2df58 commit 350efe3

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

Core/Config/GUI.lua

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,18 +487,28 @@ local function CreateFrameSettings(containerParent, unit, unitHasParent, updateC
487487
XPosSlider:SetLabel("X Position")
488488
XPosSlider:SetValue(FrameDB.Layout[3])
489489
XPosSlider:SetSliderValues(-1000, 1000, 0.1)
490-
XPosSlider:SetRelativeWidth(0.5)
490+
XPosSlider:SetRelativeWidth(unit == "boss" and 0.33 or 0.5)
491491
XPosSlider:SetCallback("OnValueChanged", function(_, _, value) FrameDB.Layout[3] = value updateCallback() end)
492492
LayoutContainer:AddChild(XPosSlider)
493493

494494
local YPosSlider = AG:Create("Slider")
495495
YPosSlider:SetLabel("Y Position")
496496
YPosSlider:SetValue(FrameDB.Layout[4])
497497
YPosSlider:SetSliderValues(-1000, 1000, 0.1)
498-
YPosSlider:SetRelativeWidth(0.5)
498+
YPosSlider:SetRelativeWidth(unit == "boss" and 0.33 or 0.5)
499499
YPosSlider:SetCallback("OnValueChanged", function(_, _, value) FrameDB.Layout[4] = value updateCallback() end)
500500
LayoutContainer:AddChild(YPosSlider)
501501

502+
if unit == "boss" then
503+
local SpacingSlider = AG:Create("Slider")
504+
SpacingSlider:SetLabel("Frame Spacing")
505+
SpacingSlider:SetValue(FrameDB.Layout[5])
506+
SpacingSlider:SetSliderValues(-1, 100, 0.1)
507+
SpacingSlider:SetRelativeWidth(0.33)
508+
SpacingSlider:SetCallback("OnValueChanged", function(_, _, value) FrameDB.Layout[5] = value updateCallback() end)
509+
LayoutContainer:AddChild(SpacingSlider)
510+
end
511+
502512
local ColourContainer = GUIWidgets.CreateInlineGroup(containerParent, "Colours & Toggles")
503513

504514
local ColourWhenTappedToggle = AG:Create("CheckBox")

0 commit comments

Comments
 (0)