Difference between revisions of "Term.setCursorPos"
From ComputerCraft Wiki
m (Moved to CAT:APIFunctions) |
m (Int linking fix.) |
||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=term.setCursorPos | |name=term.setCursorPos | ||
| − | |args=[[int]] x, [[int]] y | + | |args=[[int (type)|int]] x, [[int (type)|int]] y |
|returns=none | |returns=none | ||
|api=term | |api=term | ||
Revision as of 18:31, 30 November 2012
| Sets the location of the cursor on screen. | |
| Syntax | term.setCursorPos(int x, int y) |
| Returns | none |
| Part of | ComputerCraft |
| API | term |
Examples
Basic usage
| 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
| Sets the location of the cursor to the start of the line. | |
| Code |
oldx, oldy = term.getCursorPos() |