comparison PetActionButton.lua @ 288:d931fa418e17

Merge LBF fix to default
author Flick
date Fri, 01 Jul 2011 14:32:17 -0700
parents 499ca4edf033
children 276165a0e860
comparison
equal deleted inserted replaced
287:0ea325e616ab 288:d931fa418e17
29 end 29 end
30 ]] 30 ]]
31 31
32 local _onReceiveDrag = -- function(self, button, kind, value, ...) 32 local _onReceiveDrag = -- function(self, button, kind, value, ...)
33 [[ 33 [[
34 if kind then -- pet spells on the cursor return nil from GetCursorInfo(), which is very strange 34 if kind == "petaction" then
35 return "petaction", self:GetAttribute("action")
36 else
35 return kind, value, ... 37 return kind, value, ...
36 end 38 end
37 return "petaction", self:GetAttribute("action")
38 ]] 39 ]]
39 40
40 -- 41 --
41 -- private 42 -- private
42 -- 43 --
78 ReAction.Button.PetAction = Pet 79 ReAction.Button.PetAction = Pet
79 ReAction:RegisterBarType(Pet) 80 ReAction:RegisterBarType(Pet)
80 81
81 function Pet:New( config, bar, idx, idHint ) 82 function Pet:New( config, bar, idx, idHint )
82 self = Super.New(self, config, bar, idx, "SecureActionButtonTemplate, ActionButtonTemplate" ) 83 self = Super.New(self, config, bar, idx, "SecureActionButtonTemplate, ActionButtonTemplate" )
84
85 local name = self:GetFrame():GetName()
83 86
84 local f = self:GetFrame() 87 local f = self:GetFrame()
85 if not f.autoCastTexture then 88 if not f.autoCastTexture then
86 -- store autocast stuff with the frame for recycling 89 -- store autocast stuff with the frame for recycling
87 local tex = f:CreateTexture(nil,"OVERLAY") 90 local tex = f:CreateTexture(nil,"OVERLAY")