monitor_resize event

From ComputerCraft
Jump to: navigation, search
monitor_resize
Event
Returns

Source CC:Tweaked

Occurs every time a connected Monitor resizes, for example when a player places or destroy Monitor blocks.

ExampleExampleNotify about resize
Notifies the user when a connected Monitor has been resized.
Code
while true do
  local event, peripheral_name = os.pullEvent("monitor_resize")
  local x, y = peripheral.call(peripheral_name, "getSize")
  print("Monitor", peripheral_name, "has been resized to", x, ",", y)
end