first set of fixes for WotlK
- conditional show/hide of bars is still broken - page swapping in any form is broken as well
This commit is contained in:
@@ -129,11 +129,13 @@ function ActionBar:UpdateStates()
|
||||
table_insert(statedriver, tostring(self:GetDefaultState() or 0))
|
||||
|
||||
RegisterStateDriver(self, "page", table_concat(statedriver, ";"))
|
||||
self:SetAttribute("statemap-page", "$input")
|
||||
|
||||
self:ApplyStateButton()
|
||||
|
||||
SecureStateHeader_Refresh(self)
|
||||
self:SetAttribute("_onstate-page", [[
|
||||
self:SetAttribute("state", newstate)
|
||||
return true
|
||||
]])
|
||||
|
||||
local newState = self:GetAttribute("state-page")
|
||||
self:SetAttribute("state", newState)
|
||||
|
||||
@@ -69,7 +69,7 @@ function Bartender4.Bar:Create(id, config, name)
|
||||
id = tostring(id)
|
||||
assert(not barregistry[id], "duplicated entry in barregistry.")
|
||||
|
||||
local bar = setmetatable(CreateFrame("Frame", ("BT4Bar%s"):format(id), UIParent, "SecureStateHeaderTemplate"), Bar_MT)
|
||||
local bar = setmetatable(CreateFrame("Frame", ("BT4Bar%s"):format(id), UIParent, "SecureHandlerStateTemplate"), Bar_MT)
|
||||
barregistry[id] = bar
|
||||
bar.id = id
|
||||
bar.name = name or id
|
||||
|
||||
@@ -85,8 +85,6 @@ function Bartender4.Button:Create(id, parent)
|
||||
button.textureCache.pushed = button.pushedTexture:GetTexture()
|
||||
button.textureCache.highlight = button.highlightTexture:GetTexture()
|
||||
|
||||
parent:SetAttribute("addchild", button)
|
||||
|
||||
button:SetAttribute("type", "action")
|
||||
button:SetAttribute("action", absid)
|
||||
|
||||
@@ -94,6 +92,12 @@ function Bartender4.Button:Create(id, parent)
|
||||
button:SetAttribute("useparent-statebutton", true)
|
||||
--button:SetAttribute("hidestates", "-1")
|
||||
|
||||
parent:SetAttribute('_adopt', button)
|
||||
button:SetAttribute('_childupdate', [[
|
||||
self:SetAttribute("state",)
|
||||
]]
|
||||
)
|
||||
|
||||
button:RegisterForDrag("LeftButton", "RightButton")
|
||||
button:RegisterForClicks("AnyUp")
|
||||
|
||||
@@ -222,7 +226,7 @@ function Button:RefreshStateAction(state)
|
||||
|
||||
if self.parent.config.autoassist then
|
||||
local type, id, subtype = GetActionInfo(action)
|
||||
if type == "spell" then
|
||||
if type == "spell" and id > 0 then
|
||||
local spellName, spellRank = GetSpellInfo(id, subtype)
|
||||
|
||||
local macroText
|
||||
|
||||
Reference in New Issue
Block a user