Difference between revisions of "SetCursorPos"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 2: Line 2:
 
<b>Command History</b>
 
<b>Command History</b>
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
<div style="background:#ebebeb" width="100%">Available since <span style="color:orange">v3.7</span></div>
+
<div style="background:#ebebeb" width="100%">Available since <span style="color:orange">v?</span></div>
 
</div></div>
 
</div></div>
  
Line 31: Line 31:
 
<b><u>Arguments</u></b>
 
<b><u>Arguments</u></b>
  
pos: integer (number) <br/>
+
<b>pos</b>: integer (number) <br/>
 
The position where the mouse cursor should be be moved to! {x=int,y=int}
 
The position where the mouse cursor should be be moved to! {x=int,y=int}
  
Flags: none
 
  
Return: none
+
<b><u>Flags</u></b>
{{i18n|SetCursorPos}}
+
 
 +
none
 +
 
 +
 
 +
<b><u>Return</u></b>
 +
 
 +
none
 +
{{i18n|SetCursorPos}} <br/>
 +
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 +
|-
 +
|<b>Relevant Pages</b>: [[GetCurorPos|getCursorPos]]
 +
|}

Revision as of 15:41, 12 March 2013

Command History

Available since v?


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: integer (number)
The position where the mouse cursor should be be moved to! {x=int,y=int}


Flags

none


Return

none


Relevant Pages: getCursorPos