Mercurial > wow > reaction
comparison PetActionButton.lua @ 259:c918ff9ac787
Add option to make buttons activate on mouse/key down
| author | Flick |
|---|---|
| date | Mon, 25 Apr 2011 11:43:42 -0700 |
| parents | 65f2805957a0 |
| children | 36a29870bf34 |
comparison
equal
deleted
inserted
replaced
| 256:5ab04f393b0b | 259:c918ff9ac787 |
|---|---|
| 138 -- secure handlers | 138 -- secure handlers |
| 139 barFrame:WrapScript(f, "OnDragStart", _onDragStart) | 139 barFrame:WrapScript(f, "OnDragStart", _onDragStart) |
| 140 barFrame:WrapScript(f, "OnReceiveDrag", _onReceiveDrag) | 140 barFrame:WrapScript(f, "OnReceiveDrag", _onReceiveDrag) |
| 141 | 141 |
| 142 -- event registration | 142 -- event registration |
| 143 f:EnableMouse(true) | |
| 144 f:RegisterForDrag("LeftButton", "RightButton") | 143 f:RegisterForDrag("LeftButton", "RightButton") |
| 145 f:RegisterForClicks("AnyUp") | |
| 146 for _, evt in pairs(eventList) do | 144 for _, evt in pairs(eventList) do |
| 147 f:RegisterEvent(evt) | 145 f:RegisterEvent(evt) |
| 148 end | 146 end |
| 149 | 147 |
| 150 -- attach to skinner | 148 -- attach to skinner |
