Quantcast

Fixes to Gestures. A basic demo enabled that will show your own tooltip after you go left, right, left, right. You'll have to be mousing over someone for this to work. StarTip auto-hides the tooltip when you're not hovering over a unit.

Scott Sibley [10-05-10 - 07:04]
Fixes to Gestures. A basic demo enabled that will show your own tooltip after you go left, right, left, right. You'll have to be mousing over someone for this to work. StarTip auto-hides the tooltip when you're not hovering over a unit.
Filename
Modules/Gestures/Gestures.lua
Modules/UnitTooltip/UnitTooltip.lua
StarTip.lua
diff --git a/Modules/Gestures/Gestures.lua b/Modules/Gestures/Gestures.lua
index 8199ec0..8ddea80 100644
--- a/Modules/Gestures/Gestures.lua
+++ b/Modules/Gestures/Gestures.lua
@@ -18,7 +18,10 @@ local defaults = {
 				enabled = true,
 				gestures = {{type="line", pattern="right"}, {type="line", pattern="left"}, {type="line", pattern="right"}, {type="line", pattern="left"}},
 				expression = [[
---_G.GameTooltip:Hide()
+_G.GameTooltip:SetOwner(_G.UIParent, "ANCHOR_CURSOR")
+_G.GameTooltip:SetParent(_G.UIParent)
+_G.GameTooltip:SetUnit("player")
+_G.GameTooltip:Show()
 ]]
 			}
 		}
diff --git a/Modules/UnitTooltip/UnitTooltip.lua b/Modules/UnitTooltip/UnitTooltip.lua
index 10fbcb7..e099ab1 100644
--- a/Modules/UnitTooltip/UnitTooltip.lua
+++ b/Modules/UnitTooltip/UnitTooltip.lua
@@ -589,7 +589,7 @@ function mod:OnHide()
 end
 ]]

-function mod.GameTooltipHide()
+function mod.OnHide()
 	for i, v in ipairs(lines) do
 		if v.leftObj then
 			v.leftObj:Stop()
diff --git a/StarTip.lua b/StarTip.lua
index aa3d72f..4b82fdf 100644
--- a/StarTip.lua
+++ b/StarTip.lua
@@ -780,11 +780,12 @@ function StarTip:GameTooltipShow(...)

 	if not show then GameTooltip:Hide(); return end

+	--[[
 	for k, v in StarTip:IterateModules() do
 		if v.GameTooltipShow and v:IsEnabled() then
 			show = show and v:GameTooltipShow(...)
 		end
-	end
+	end]]

 	if show then
 		StarTip.hooks[GameTooltip].Show(...)