Mercurial > wow > reaction
comparison StanceButton.lua @ 258:a7d2efb6ffc9 stable
Merge 1.1 beta 5 to stable
author | Flick |
---|---|
date | Tue, 12 Apr 2011 16:07:21 -0700 |
parents | 46b59a9ded76 |
children | c918ff9ac787 |
comparison
equal
deleted
inserted
replaced
257:920d17851a93 | 258:a7d2efb6ffc9 |
---|---|
33 -- | 33 -- |
34 local buttonTypeID = "Stance" | 34 local buttonTypeID = "Stance" |
35 local Super = ReAction.Button | 35 local Super = ReAction.Button |
36 local Stance = setmetatable( | 36 local Stance = setmetatable( |
37 { | 37 { |
38 defaultConfig = { | 38 defaultBarConfig = { |
39 type = buttonTypeID, | 39 type = buttonTypeID, |
40 btnHeight = 36, | 40 btnHeight = 36, |
41 btnWidth = 36, | 41 btnWidth = 36, |
42 btnRows = 1, | 42 btnRows = 1, |
43 btnColumns = 6, | 43 btnColumns = 6, |
59 | 59 |
60 local f = self:GetFrame() | 60 local f = self:GetFrame() |
61 local barFrame = bar:GetFrame() | 61 local barFrame = bar:GetFrame() |
62 local config = self:GetConfig() | 62 local config = self:GetConfig() |
63 | 63 |
64 -- set up the base stance ID | 64 -- set up the stance ID |
65 self:SetActionIDPool("stance",8) | 65 config.stanceID = config.stanceID or idx |
66 config.stanceID = self:AcquireActionID(config.stanceID, idHint, true) | |
67 | 66 |
68 -- attribute setup | 67 -- attribute setup |
69 f:SetAttribute("type","spell") | 68 f:SetAttribute("type","spell") |
70 | 69 |
71 -- non secure scripts | 70 -- non secure scripts |
97 return self | 96 return self |
98 end | 97 end |
99 | 98 |
100 function Stance:GetActionID() | 99 function Stance:GetActionID() |
101 return self.config.stanceID | 100 return self.config.stanceID |
101 end | |
102 | |
103 function Stance:AcquireActionID() | |
104 -- don't use pool | |
105 end | |
106 | |
107 function Stance:ReleaseActionID() | |
108 -- don't use pool | |
102 end | 109 end |
103 | 110 |
104 function Stance:UpdateAction() | 111 function Stance:UpdateAction() |
105 if InCombatLockdown() then | 112 if InCombatLockdown() then |
106 self.updatePending = true | 113 self.updatePending = true |