(Formerly known as GetGUIObjectAt, which is now obsolete)
static GUIControl* GUIControl.GetAtScreenXY(int x, int y)
Checks whether there is a GUI control at screen co-ordinates (X,Y). Returns
the control object if there is, or null if there is not. You probably
want to use this in conjunction with GetGUIAtLocation.
Example:
GUIControl *theControl = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
if (theControl == lstSaveGames) {
Display("The mouse is over the Save Games list box.");
}
else if (theControl == null) {
Display("The mouse is not over a control.");
}
else {
GUI *onGui = theControl.OwningGUI;
Display("The mouse is over control %d on GUI %d.", theControl.ID, onGui.ID);
}
will display what control the mouse is over.
See Also: GUI.GetAtScreenXY
|