The API is no longer being updated here until further notice. |
Invoked when the cursor enters the widget's interactive area.
ScriptRegion OnEnter(self, motion)
Arguments[]
- self
- ScriptObject - The widget the cursor is hovering over.
- motion
- boolean - True if the handler is being run due to actual mouse movement; false if the cursor entered the frame due to other circumstances (such as the frame being created underneath the cursor)
Example[]
local f = CreateFrame("Frame", nil, nil, "BackdropTemplate")
f:SetPoint("CENTER")
f:SetSize(100, 100)
f:SetBackdrop(BACKDROP_TUTORIAL_16_16)
f:SetScript("OnEnter", function(self, motion)
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
GameTooltip:SetText("Hello World")
end)
f:SetScript("OnLeave", function(self, motion)
GameTooltip:Hide()
end)