term.clear
Clears the terminal object using the current background colour. The term's cursor position, text colour and background colour states remain unchanged.
|
|||
| Clears the current term. | |||
| Code | <nowiki>
print("Hello, world!")
sleep(1)
term.clear()
</nowiki>
|
||
| Output | Hello, world! is printed, and then disappears after 1 second. |
||
|
|||
| Clears the current term with a red background colour. | |||
| Code | <nowiki>
term.setBackgroundColour(colours.red)
term.clear()
</nowiki>
|
||
| Output | The screen is cleared and filled with red. | ||
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| term.clear Function | |
|---|---|
|
Syntax term.clear() | |
| 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.