Difference between revisions of "Term (API)"
From ComputerCraft Wiki
| Line 1: | Line 1: | ||
| − | The Terminal API provides functions | + | The Terminal API provides functions for ASCII graphics. |
| − | + | {| border="1" cellpadding="2" cellspacing="0" | |
| − | *term.write( text ) | + | !style="background:#EEE" width="200px"|Method name |
| − | + | !style="background:#EEE" width="*"|Description | |
| − | + | |- | |
| − | + | |term.write( text ) | |
| − | + | |Writes text to the screen. | |
| − | + | |- | |
| − | + | |term.clear() | |
| − | + | |Clears the entire screen | |
| + | |- | ||
| + | |term.clearLine() | ||
| + | |Clears the line the cursor is on | ||
| + | |- | ||
| + | |term.getCursorPos() | ||
| + | |Returns position of the cursor | ||
| + | |term.setCursorPos( x, y ) | ||
| + | |Sets the cursor's position. | ||
| + | |- | ||
| + | |term.setCursorBlink( b ) | ||
| + | |Disables the blinking or turns it on. | ||
| + | |- | ||
| + | |term.getSize() | ||
| + | |Gets the size of the screen. (Good for if you're making something to be compatible with both [[Turtles]] and [[Consoles]]. | ||
| + | |- | ||
| + | |term.scroll( n ) | ||
| + | |Scrolls the terminal. | ||
| + | |} | ||
[[Category:APIs]] | [[Category:APIs]] | ||
Revision as of 05:49, 31 January 2012
The Terminal API provides functions for ASCII graphics.
| Method name | Description | ||
|---|---|---|---|
| term.write( text ) | Writes text to the screen. | ||
| term.clear() | Clears the entire screen | ||
| term.clearLine() | Clears the line the cursor is on | ||
| term.getCursorPos() | Returns position of the cursor | term.setCursorPos( x, y ) | Sets the cursor's position. |
| term.setCursorBlink( b ) | Disables the blinking or turns it on. | ||
| term.getSize() | Gets the size of the screen. (Good for if you're making something to be compatible with both Turtles and Consoles. | ||
| term.scroll( n ) | Scrolls the terminal. |