diff --git a/ActionBarPrototype.lua b/ActionBarPrototype.lua index b820e32..1775c39 100644 --- a/ActionBarPrototype.lua +++ b/ActionBarPrototype.lua @@ -161,6 +161,7 @@ function ActionBar:UpdateButtons(numbuttons) buttons[i]:Hide() end + self.numbuttons = numbuttons self.buttons = buttons self:UpdateButtonLayout() diff --git a/Bar.lua b/Bar.lua index de155fa..02eb143 100644 --- a/Bar.lua +++ b/Bar.lua @@ -193,7 +193,7 @@ function Bar:GetOptionObject() name = "Scale", desc = "Configure the scale of the bar.", type = "range", - min = .1, max = 2, step = 0.05, bigStep = 0.1, + min = .1, max = 2, step = 0.05, get = optGetter, set = optSetter, }, diff --git a/ButtonBar.lua b/ButtonBar.lua index be09114..5c7e263 100644 --- a/ButtonBar.lua +++ b/ButtonBar.lua @@ -143,9 +143,10 @@ ButtonBar.button_width = 36 ButtonBar.button_height = 36 function ButtonBar:UpdateButtonLayout() local buttons = self.buttons - local numbuttons = #buttons local pad = self:GetPadding() + local numbuttons = self.numbuttons or #buttons + -- bail out if the bar has no buttons, for whatever reason -- (eg. stanceless class, or no stances learned yet, etc.) if numbuttons == 0 then return end