Difference between revisions of "SetCursorPos"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "<b>History</b>: Available since <span style="color:green">v3.7</span> Sets position (absolute) of the mouse cursor to the x,y position provided! Syntax: <syntaxhighlight> se...")
 
(Redirected page to Global Command: setCursorPos)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<b>History</b>: Available since <span style="color:green">v3.7</span>
+
#REDIRECT [[Global Command: setCursorPos]]
 
 
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>
 
 
 
 
 
<b><u>Arguments</u></b>
 
 
 
pos: integer (number) <br/>
 
The position where the mouse cursor should be be moved to! {x=int,y=int}
 
 
 
Flags: none
 
 
 
Return: none
 
{{i18n|SetCursorPos}}
 

Latest revision as of 13:29, 19 May 2023