WoW:API GetCursorPosition: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 27: Line 27:
;''Description''
;''Description''


: Returns scale-independant coordinates similar to Cursor:GetCenter() if 'Cursor' was a valid frame.
: Returns scale-independant coordinates similar to Cursor:GetCenter() if 'Cursor' was a valid frame. You can use this value relative to UIParent if you treat BOTTOMLEFT as 0,0. Remember to also apply scale.


----
----


{{template:WoW API}}
{{template:WoW API}}

Revision as of 19:27, 1 July 2006

GetCursorPosition -Documentation by Kolth-

Returns the cursor's position on the screen.

GetCursorPosition();


Arguments
none

Returns
x
Number - The cursor's x-position on the screen.
y
Number - The cursor's y-position on the screen.

Example
 local x, y = GetCursorPosition();
Result
x = 956.24999166082;
y = 538.49999965651;

Description
Returns scale-independant coordinates similar to Cursor:GetCenter() if 'Cursor' was a valid frame. You can use this value relative to UIParent if you treat BOTTOMLEFT as 0,0. Remember to also apply scale.

Template:WoW API