mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 05:30:00 +00:00
Added a fillmode variant to actionbars
This commit is contained in:
@@ -1277,6 +1277,7 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
|
||||
local background = C.bars["bar"..i].background
|
||||
local formfactor = C.bars["bar"..i].formfactor
|
||||
local uneven = C.bars["bar"..i].uneven or "Down"
|
||||
local fillmode = C.bars["bar"..i].fillmode or "auto"
|
||||
-- validate uneven against bar shape and reset if incompatible
|
||||
local _, _, fcols2, frows2 = string.find(tostring(formfactor or ""), "(%d+)%s*x%s*(%d+)")
|
||||
fcols2, frows2 = tonumber(fcols2), tonumber(frows2)
|
||||
@@ -1421,7 +1422,7 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
|
||||
bars[i][j] = CreateActionButton(bars[i], i, j)
|
||||
bars[i][j].bar = i
|
||||
|
||||
BarButtonAnchor(bars[i][j], buttonbasename, j, buttons, formfactor, size, border, spacing, uneven)
|
||||
BarButtonAnchor(bars[i][j], buttonbasename, j, buttons, formfactor, size, border, spacing, uneven, fillmode)
|
||||
bars[i][j]:ClearAllPoints()
|
||||
bars[i][j]:SetPoint(unpack(bars[i][j]._anchor))
|
||||
bars[i][j]:Show()
|
||||
@@ -1452,7 +1453,7 @@ pfUI:RegisterModule("actionbar", "vanilla", function ()
|
||||
end
|
||||
|
||||
-- adjust actionbar size
|
||||
BarLayoutSize(bars[i], buttons, formfactor, size, border, spacing, uneven)
|
||||
BarLayoutSize(bars[i], buttons, formfactor, size, border, spacing, uneven, fillmode)
|
||||
bars[i]:SetWidth(bars[i]._size[1])
|
||||
bars[i]:SetHeight(bars[i]._size[2])
|
||||
bars[i]:ClearAllPoints()
|
||||
|
||||
@@ -2662,6 +2662,9 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
end
|
||||
CreateConfig(layout_ufunc, T["Layout"], C.bars["bar"..id], "formfactor", "dropdown", formfactors)
|
||||
uneven_frame = CreateConfig(U["bars"], T["Layout Uneven Orientation"], C.bars["bar"..id], "uneven", "dropdown", uneven_options)
|
||||
CreateConfig(U["bars"], T["Fill Order"], C.bars["bar"..id], "fillmode", "dropdown", function()
|
||||
return {"auto:Auto", "row:Row-first (1,2,3 / 4,5,6)", "col:Column-first (1,3,5 / 2,4,6)"}
|
||||
end)
|
||||
CreateConfig(U["bars"], T["Bar Background"], C.bars["bar"..id], "background", "checkbox")
|
||||
CreateConfig(U["bars"], T["Show Hotkey Text"], C.bars["bar"..id], "showkeybind", "checkbox")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user