Difference between revisions of "Global Command: setCursorPos"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "<div class="toccolours mw-collapsible mw-collapsed tbl-ds"> <span class="bold">Function History</span> <div class="mw-collapsible-content"> <div class="alt-bg">Available since...")
 
Line 47: Line 47:
 
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 
|-
 
|-
|<span class="bold">Relevant Pages</span>: [[GetCursorPos_CMS)|getCursorPos]]
+
|<span class="bold">Relevant Pages</span>: [[GetCursorPos_(CMS)|getCursorPos]]
 
|}
 
|}

Revision as of 17:54, 23 March 2014

Function History

Available since v3.3


Sets position (absolute) of the mouse cursor to the x,y position provided.


Syntax:

setCursorPos(pos)


Example:

-- let's set mouse cursor to 240 by 480
setCursorPos({x=240,y=480})

-- you could of course use variables instead...
local cPos = {x=240,y=480}
setCursorPos(cPos)
-- or ...
setCursorPos({x=cPos.x,y=cPos.y})


Arguments

pos: point (x,y)
The position where the mouse cursor should be be moved to. {x=int,y=int}


Flags

none


Return

none


Relevant Pages: getCursorPos