View Single Post
05-07-21, 07:49 AM   #8
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
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 View Post
Blizzard added that functionality awhile ago:
Lua Code:
  1. local f = CreateFrame("Frame",nil,UIParent)
  2. f.tex = f:CreateTexture()
  3. f.tex:SetAllPoints(f)
  4. f.tex:SetColorTexture(0.5, 0.2, 1 , 0.5)
  5. f:SetSize(300,200)
  6. f:SetPoint("CENTER")
  7. f:SetScript ("OnEnter", function(self) print("OnEnter")  end)
  8. f:SetScript ("OnLeave", function(self) print("OnLeave")  end)
  9. f:EnableMouse(false)
  10. 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.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote