monitor resize (event)

From ComputerCraft Wiki
Jump to: navigation, search



Grid Modem.png  Event monitor_resize
Fired when the monitor attached on any side is resized by adding or removing blocks.
Returned Object 1 The side of the computer on which the monitor has been resized.

Examples

Grid paper.png  Example
Returns the side of the computer when the monitor size is changed.
Code
while true do
  local event, p1 = os.pullEvent("monitor_resize")
  print("The monitor on the "..p1.." side has been resized")
end
Output If the monitor on the right side has been adjusted, then the output is thus: "The monitor on the right side has been resized".