WoW:USERAPI GetCursorScaledPosition (source)
Revision as of 11:08, 24 November 2007
, 24 November 2007→Returns
m (New page: {{userfunc}} <!-- Leave this line in! --> <center>'''{{PAGENAME}}''' ''- by Egingell -''</center> Returns the scaled position of the cursor. x, y = {{PAGENAME}}() == ...) |
m (→Returns) |
||
| Line 1: | Line 1: | ||
{{userfunc}} <!-- Leave this line in! --> | {{userfunc}} <!-- Leave this line in! --> | ||
<center>'''{{PAGENAME}}''' ''- by [[User:Egingell|Egingell]] -''</center> | <center>'''{{PAGENAME}}''' ''- by [[User:Egingell|Egingell]] -''</center> | ||
Returns the scaled position of the cursor. | Returns the scaled position of the cursor. | ||
x, y = {{PAGENAME}}() | local x, y = {{PAGENAME}}() | ||
== Function Parameters == | == Function Parameters == | ||
=== Returns === | === Returns === | ||
;x | |||
:The scaled x position of the cursor | :The scaled x position of the cursor | ||
;y | |||
:The scaled y position of the cursor | :The scaled y position of the cursor | ||
| Line 24: | Line 20: | ||
==Code== | ==Code== | ||
local function {{PAGENAME}}() | |||
local scale, x, y = UIParent:GetScale(), GetCursorPosition() | |||
function {{PAGENAME}}() | return x / scale, y / scale | ||
end | end | ||
__NOTOC__ | __NOTOC__ | ||
[[Category:User Defined Functions]] | [[Category:User Defined Functions]] | ||