This page documents a user-defined function that you can copy and paste into your addon. Replace <PREFIX> with your AddOn's prefix to avoid conflicts between different versions of these functions.
User defined functions < GetCursorScaledPosition

Returns the scaled position of the cursor.

local x, y = USERAPI GetCursorScaledPosition()

Function Parameters Edit

Returns Edit

The scaled x position of the cursor
The scaled y position of the cursor

Example Edit

local x, y = USERAPI GetCursorScaledPosition();
message('('..x..', '..y..')');


(25.45218785412654, 375.45610597856123)


local function USERAPI GetCursorScaledPosition()
	local scale, x, y = UIParent:GetScale(), GetCursorPosition()
	return x / scale, y / scale

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.