Difference between revisions of "SetCursorPos"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Redirected page to Global Command: setCursorPos)
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
+
#REDIRECT [[Global Command: setCursorPos]]
<span class="bold">Command History</span>
 
<div class="mw-collapsible-content">
 
<div class="alt-bg">Available since v?</div>
 
</div></div>
 
 
 
 
 
Sets position (absolute) of the mouse cursor to the x,y position provided!
 
 
 
 
 
Syntax:
 
<syntaxhighlight>
 
setCursorPos(pos)
 
</syntaxhighlight>
 
 
 
 
 
Example:
 
<syntaxhighlight>
 
-- 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})
 
</syntaxhighlight>
 
 
 
 
 
 
 
<span class="bold underline">Arguments</span>
 
 
 
<span class="bold">pos</span>: point (x,y) <br/>
 
The position where the mouse cursor should be be moved to! {x=int,y=int}
 
 
 
 
 
<span class="bold underline">Flags</span>
 
 
 
none
 
 
 
 
 
<span class="bold underline">Return</span>
 
 
 
none
 
{{i18n|SetCursorPos}} <br/>
 
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 
|-
 
|<span class="bold">Relevant Pages</span>: [[GetCursorPos|getCursorPos]]
 
|}
 

Latest revision as of 12:29, 19 May 2023