- cleanup of mouse interaction for all modules

This commit is contained in:
Parnic
2010-10-16 20:00:35 +00:00
parent 7bf4c9b56e
commit f63c263669
5 changed files with 22 additions and 4 deletions

View File

@ -306,6 +306,10 @@ function FocusHealth.prototype:EnableClickTargeting(bEnable)
else
self.frame.button:EnableMouse(false)
self.frame.button:RegisterForClicks()
-- set up click casting
ClickCastFrames = ClickCastFrames or {}
ClickCastFrames[self.frame.button] = false
end
end

View File

@ -223,6 +223,10 @@ function PetHealth.prototype:EnableClickTargeting(bEnable)
else
self.frame.button:EnableMouse(false)
self.frame.button:RegisterForClicks()
-- set up click casting
ClickCastFrames = ClickCastFrames or {}
ClickCastFrames[self.frame.button] = false
end
end

View File

@ -917,6 +917,7 @@ function PlayerHealth.prototype:EnableClickTargeting(bEnable)
self.frame.button:RegisterForClicks()
self.frame.button:SetAttribute("type1")
self.frame.button:SetAttribute("type2")
self.frame.button:SetAttribute("unit")
-- set up click casting
ClickCastFrames = ClickCastFrames or {}

View File

@ -730,6 +730,11 @@ function IceTargetHealth.prototype:EnableClickTargeting(bEnable)
self.frame.button:EnableMouse(false)
self.frame.button:RegisterForClicks()
-- click casting support
ClickCastFrames = ClickCastFrames or {}
ClickCastFrames[self.frame.button] = false
self.frame.button:SetParent()
self.frame.button = nil
end
end

View File

@ -312,11 +312,19 @@ function TargetOfTarget.prototype:CreateFrame()
self.frame:SetScript("OnEnter", function(frame) self:OnEnter(frame) end)
self.frame:SetScript("OnLeave", function(frame) self:OnLeave(frame) end)
-- click casting support
ClickCastFrames = ClickCastFrames or {}
ClickCastFrames[self.frame] = true
else
self.frame:EnableMouse(false)
self.frame:RegisterForClicks()
self.frame:SetScript("OnEnter", nil)
self.frame:SetScript("OnLeave", nil)
-- click casting support
ClickCastFrames = ClickCastFrames or {}
ClickCastFrames[self.frame] = false
end
self.frame:SetAttribute("type1", "target")
@ -326,10 +334,6 @@ function TargetOfTarget.prototype:CreateFrame()
self:CreateToTFrame()
self:CreateToTHPFrame()
self:CreateDebuffFrame()
-- click casting support
ClickCastFrames = ClickCastFrames or {}
ClickCastFrames[self.frame] = true
end