Difference between revisions of "Term.setCursorPos"
From ComputerCraft Wiki
m (Int linking fix.) |
(Changing int to number) |
||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=term.setCursorPos | |name=term.setCursorPos | ||
− | |args= | + | |args={{type|number}} x, {{type|number}} y |
|returns=none | |returns=none | ||
|api=term | |api=term |
Revision as of 11:40, 18 July 2013
Function term.setCursorPos | |
Sets the location of the cursor on screen. | |
Syntax | term.setCursorPos(number x, number y) |
Returns | none |
Part of | ComputerCraft |
API | term |
Examples
Basic usage
Example | |
Sets the location of the cursor on screen to the top | |
Code |
term.setCursorPos(1,1) |
Using the old cursor position to affect the new one
Example | |
Sets the location of the cursor to the start of the line. | |
Code |
oldx, oldy = term.getCursorPos() |