API GetMouseFocus

From Wowpedia
Jump to: navigation, search

Returns the frame that is currently receiving mouse events. The frame must have enableMouse="true"

frameID = GetMouseFocus();

Parameters

Arguments

none

Results

frameID 
Table - The frame that currently has the mouse focus.

Example

You can get the name of the mouse-enabled frame beneath the pointer with this:

message( "The mouse is over " .. GetMouseFocus():GetName() );

Result

The mouse is over WorldFrame