Difference between revisions of "Term.setCursorPos"
From ComputerCraft Wiki
(Use Talk:Term.setCursorPos) |
(grammar) |
||
| Line 13: | Line 13: | ||
|code=term.setCursorPos(1,1) | |code=term.setCursorPos(1,1) | ||
}} | }} | ||
| − | ===Using the old cursor position to | + | ===Using the old cursor position to affect the new one=== |
{{Example | {{Example | ||
|desc=Sets the location of the cursor to the start of the line. | |desc=Sets the location of the cursor to the start of the line. | ||
Revision as of 00:56, 30 September 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() |