Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

totem: Destroy the OnClick handler.

DestroyTotem() is currently protected and there's no easy way to handle
this.

Fixes #168.
  • Loading branch information...
commit 526b0dfaaea82316322e188287bd31e37747fd9a 1 parent 824d34d
@haste authored
Showing with 1 addition and 12 deletions.
  1. +1 −12 elements/totems.lua
View
13 elements/totems.lua
@@ -15,10 +15,7 @@
Notes
- A OnClick handler, which calls DestroyTotem() when clicked, will be applied to
- the `Totem` widget, if it supports OnClick.
-
- It will also set OnEnter and OnLeave, to display the default Tooltip, if the
+ OnEnter and OnLeave will be set to display the default Tooltip, if the
`Totem` widget is mouse enabled.
Options
@@ -67,10 +64,6 @@ if(select(2, UnitClass'player') == 'SHAMAN') then
priorities = SHAMAN_TOTEM_PRIORITIES
end
-local OnClick = function(self)
- DestroyTotem(self:GetID())
-end
-
local UpdateTooltip = function(self)
GameTooltip:SetTotem(self:GetID())
end
@@ -139,10 +132,6 @@ local Enable = function(self)
totem:SetID(priorities[i])
- if(totem:HasScript'OnClick') then
- totem:SetScript('OnClick', OnClick)
- end
-
if(totem:IsMouseEnabled()) then
totem:SetScript('OnEnter', OnEnter)
totem:SetScript('OnLeave', OnLeave)
Please sign in to comment.
Something went wrong with that request. Please try again.