SetCursorPos: Difference between revisions

From The Official Visionaire Studio: Adventure Game Engine Wiki
No edit summary
No edit summary
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%">
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
<b>Command History</b>
<span class="bold">Command History</span>
<div class="mw-collapsible-content">
<div class="mw-collapsible-content">
<div style="background:#ebebeb" width="100%">Available since <span style="color:orange">v?</span></div>
<div class="alt-bg">Available since v?</div>
</div></div>
</div></div>


Line 29: Line 29:




<b><u>Arguments</u></b>
<span class="bold underline">Arguments</span>


<b>pos</b>: point (x,y) <br/>
<span class="bold">pos</span>: point (x,y) <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}




<b><u>Flags</u></b>
<span class="bold underline">Flags</span>


none
none




<b><u>Return</u></b>
<span class="bold underline">Return</span>


none
none
Line 46: Line 46:
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
|-
|-
|<b>Relevant Pages</b>: [[GetCursorPos|getCursorPos]]
|<span class="bold">Relevant Pages</span>: [[GetCursorPos|getCursorPos]]
|}
|}

Revision as of 14:30, 3 April 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: 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