Difference between revisions of "Term.getSize"
From ComputerCraft Wiki
(note) |
|||
Line 1: | Line 1: | ||
− | + | {{lowercase}} | |
+ | {{Function | ||
+ | |name=term.getSize | ||
+ | |returns=The width and height of the terminal window. | ||
+ | |api=term | ||
+ | |addon=ComputerCraft | ||
+ | |desc=Returns the width and height of the terminal window. | ||
+ | |examples= | ||
+ | {{Example | ||
+ | |desc=Sets the cursor position to the edge of the terminal window. | ||
+ | |code=local w, h = term.getSize() | ||
+ | term.setCursorPos(w,1) | ||
+ | }} | ||
+ | }} |
Revision as of 00:02, 3 July 2012
Function term.getSize | |
Returns the width and height of the terminal window. | |
Syntax | term.getSize() |
Returns | The width and height of the terminal window. |
Part of | ComputerCraft |
API | term |
Examples
Example | |
Sets the cursor position to the edge of the terminal window. | |
Code |
local w, h = term.getSize() term.setCursorPos(w,1) |