Difference between revisions of "SetCursorPos"
From The Official Visionaire Studio: Adventure Game Engine Wiki
| Line 1: | Line 1: | ||
| − | + | ==setCursorPos== | |
| − | |||
| − | |||
| − | |||
| − | |||
| + | <div class="command-min-version-info">Available since: <span class="command-min-version">v3.3</span></div> | ||
| − | Sets | + | <div class="command-doc">Sets the absolute cursor position.</div> |
| − | + | Lua Syntax: | |
| − | + | <pre class="command-syntax">setCursorPos(pos)</pre> | |
| + | ===Arguments=== | ||
| + | ====pos==== | ||
| + | :'''{x=int,y=int}''' - The position where the cursor will be set to. | ||
| + | ===Flags=== | ||
| + | ===Return Values=== | ||
| + | None. | ||
| + | ===Examples=== | ||
| + | Example 1: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| − | setCursorPos( | + | setCursorPos({x=240,y=480}) |
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | Example 2: | |
| − | |||
| − | Example: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| − | |||
| − | |||
| − | |||
| − | |||
local cPos = {x=240,y=480} | local cPos = {x=240,y=480} | ||
setCursorPos(cPos) | setCursorPos(cPos) | ||
| − | |||
| − | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Revision as of 17:12, 22 November 2013
setCursorPos
Available since: v3.3
Sets the absolute cursor position.
Lua Syntax:
setCursorPos(pos)
Arguments
pos
- {x=int,y=int} - The position where the cursor will be set to.
Flags
Return Values
None.
Examples
Example 1:
setCursorPos({x=240,y=480})Example 2:
local cPos = {x=240,y=480}
setCursorPos(cPos)