term.setCursorPos
Sets the X and Y position of the cursor on the terminal object. The next write on this terminal object will begin from the new cursor position.
|
|||
Clears the bottom line of the screen with a red colour, and prints "Hello, world!" in white text. | |||
Code | <nowiki>
local width, height = term.getSize()
term.setBackgroundColour(colours.red)
term.setTextColour(colours.white)
term.setCursorPos(1, height - 1)
term.clearLine()
term.write("Hello, world!")
</nowiki>
|
||
Output |
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
term.setCursorPos Function | |
---|---|
Syntax term.setCursorPos(
| |
Returns | nil |
API | term |
Source | CC:Tweaked (source) |
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.