So, even though you later disable the mouse, because you have set up the scripts it will work for those actions ? And, nice find with the SetMouseMotionEnabled function. Not seen that one yet myself.
Originally Posted by Vrul
Blizzard added that functionality awhile ago:
Lua Code:
local f = CreateFrame("Frame",nil,UIParent) f.tex = f:CreateTexture() f.tex:SetAllPoints(f) f.tex:SetColorTexture(0.5, 0.2, 1 , 0.5) f:SetSize(300,200) f:SetPoint("CENTER") f:SetScript ("OnEnter", function(self) print("OnEnter") end) f:SetScript ("OnLeave", function(self) print("OnLeave") end) f:EnableMouse(false) f:SetMouseMotionEnabled(true)
The order of the last four lines is important. Setting a script dealing with the mouse automatically enables the mouse. So set your OnEnter/OnLeave scripts, then disable the mouse, and finally enable motion scripts only.
|