Mercurial > wow > reaction
changeset 113:77bb68eb402b
Fixed bug with mindcontrol actions: simplified action attributes
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Fri, 09 Jan 2009 18:11:12 +0000 |
parents | a66595385917 |
children | d39cfbdde301 |
files | modules/Action.lua |
diffstat | 1 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/modules/Action.lua Fri Jan 09 18:10:47 2009 +0000 +++ b/modules/Action.lua Fri Jan 09 18:11:12 2009 +0000 @@ -936,23 +936,26 @@ self.border = _G[name.."Border"] f:SetAttribute("action", config.actionID) + f:SetAttribute("default-action", config.actionID) -- install mind control actions for all buttons just for simplicity if self.idx <= 12 then - f:SetAttribute("*action-mc", 120 + self.idx) + f:SetAttribute("mindcontrol-action", 120 + self.idx) end -- set a _childupdate handler, called within the header's context f:SetAttribute("_childupdate", -- function _childupdate(self, snippetid, message) [[ - local action = "action" + local action = "default-action" if doMindControl and GetBonusBarOffset() == 5 then - action = "*action-mc" + action = "mindcontrol-action" elseif page and state and page[state] then - action = "*action-"..page[state] + action = "action-"..page[state] end local value = self:GetAttribute(action) - self:SetAttribute("action",value) + if value then + self:SetAttribute("action",value) + end ]]) -- install drag wrappers to lock buttons @@ -1059,7 +1062,7 @@ end self.config.pageactions[page] = id IDAlloc:Acquire(self.config.pageactions[page]) - self.frame:SetAttribute(("*action-page%d"):format(page),id) + self.frame:SetAttribute(("action-page%d"):format(page),id) else IDAlloc:Release(self.config.actionID) self.config.actionID = id @@ -1067,7 +1070,7 @@ self.frame:SetAttribute("action",id) if self.config.pageactions then self.config.pageactions[1] = id - self.frame:SetAttribute("*action-page1",id) + self.frame:SetAttribute("action-page1",id) end end end @@ -1087,12 +1090,12 @@ else c[i] = self.config.actionID -- page 1 is the same as the base actionID end - f:SetAttribute(("*action-page%d"):format(i),c[i]) + f:SetAttribute(("action-page%d"):format(i),c[i]) end for i = nPages+1, #c do IDAlloc:Release(c[i]) c[i] = nil - f:SetAttribute(("*action-page%d"):format(i),nil) + f:SetAttribute(("action-page%d"):format(i),nil) end self.nPages = nPages end