tweaks
This commit is contained in:
@@ -161,6 +161,7 @@ function ActionBar:UpdateButtons(numbuttons)
|
|||||||
buttons[i]:Hide()
|
buttons[i]:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.numbuttons = numbuttons
|
||||||
self.buttons = buttons
|
self.buttons = buttons
|
||||||
|
|
||||||
self:UpdateButtonLayout()
|
self:UpdateButtonLayout()
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ function Bar:GetOptionObject()
|
|||||||
name = "Scale",
|
name = "Scale",
|
||||||
desc = "Configure the scale of the bar.",
|
desc = "Configure the scale of the bar.",
|
||||||
type = "range",
|
type = "range",
|
||||||
min = .1, max = 2, step = 0.05, bigStep = 0.1,
|
min = .1, max = 2, step = 0.05,
|
||||||
get = optGetter,
|
get = optGetter,
|
||||||
set = optSetter,
|
set = optSetter,
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-1
@@ -143,9 +143,10 @@ ButtonBar.button_width = 36
|
|||||||
ButtonBar.button_height = 36
|
ButtonBar.button_height = 36
|
||||||
function ButtonBar:UpdateButtonLayout()
|
function ButtonBar:UpdateButtonLayout()
|
||||||
local buttons = self.buttons
|
local buttons = self.buttons
|
||||||
local numbuttons = #buttons
|
|
||||||
local pad = self:GetPadding()
|
local pad = self:GetPadding()
|
||||||
|
|
||||||
|
local numbuttons = self.numbuttons or #buttons
|
||||||
|
|
||||||
-- bail out if the bar has no buttons, for whatever reason
|
-- bail out if the bar has no buttons, for whatever reason
|
||||||
-- (eg. stanceless class, or no stances learned yet, etc.)
|
-- (eg. stanceless class, or no stances learned yet, etc.)
|
||||||
if numbuttons == 0 then return end
|
if numbuttons == 0 then return end
|
||||||
|
|||||||
Reference in New Issue
Block a user