Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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)

Advertisement