Furhter split of the StateBar from the ActionBar

This commit is contained in:
Hendrik Leppkes
2009-02-23 16:12:18 +01:00
parent d0f4650b58
commit 723bb00618
3 changed files with 25 additions and 29 deletions
+10 -1
View File
@@ -146,6 +146,12 @@ function Bartender4.Button:Create(id, parent)
button:UpdateGrid()
button:ToggleButtonElements()
button:ClearStateAction()
for page = 0,11,1 do
local action = (page == 0) and button.id or (button.rid + (page - 1) * 12)
button:SetStateAction(page, action)
end
return button
end
@@ -241,6 +247,10 @@ function Button:GetNormalTexture()
return self.normalTexture
end
function Button:UpdateStates()
self:RefreshAllStateActions()
end
function Button:ClearStateAction()
for state in pairs(self.stateactions) do
self.stateactions = {}
@@ -256,7 +266,6 @@ function Button:SetStateAction(state, action)
end
function Button:RefreshAllStateActions()
self.stateconfig = {}
for state in pairs(self.stateactions) do
self:RefreshStateAction(state)
end