Difference between revisions of "Term resize (event)"
From ComputerCraft Wiki
(Wrote term_resize page) |
MKlegoman357 (Talk | contribs) m (Added links in example) |
||
| Line 8: | Line 8: | ||
|code= | |code= | ||
while true do | while true do | ||
| − | + | '''[[os.pullEvent]]("term_resize")''' | |
| − | local w, h = term.getSize() | + | local w, h = [[term.getSize]]() |
print('Term Size: '..w..', '..h) | print('Term Size: '..w..', '..h) | ||
--you should redraw your user interface here to ensure it fills the entire screen and is not clipped | --you should redraw your user interface here to ensure it fills the entire screen and is not clipped | ||
end | end | ||
}} | }} | ||
Latest revision as of 16:23, 10 April 2014
| Fired when the screen changes size (through opening a new tab with bg, etc). Requires version 1.6 or higher. | |
| Returned Object 1 | Nothing |
| Prints the screen size when it changes. | |
| Code |
while true do os.pullEvent("term_resize") local w, h = term.getSize() print('Term Size: '..w..', '..h) --you should redraw your user interface here to ensure it fills the entire screen and is not clipped end |