This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
GravityScore's profile picture

Monitor Resize Event

Started by GravityScore, 18 February 2013 - 07:57 PM
GravityScore #1
Posted 18 February 2013 - 08:57 PM
Hey,

Could we have a monitor resize event, that's queued whenever an attached monitor is resized due to more monitor blocks being added to it? Could the event also include the side, so programs are able to update relevant window sizes/locations/background colours for each attached monitor?
theoriginalbit #2
Posted 18 February 2013 - 08:59 PM
this would be nice!

there are ways to do this, but an event for it would be nice just to have { "monitor_resize" } but preferably { "monitor_resize", "left" }
Kingdaro #3
Posted 18 February 2013 - 09:06 PM
This'd be pretty cool to have, as there isn't much of an efficient way to do this instantly.
Shnupbups #4
Posted 18 February 2013 - 10:02 PM
YES!

Epicness this be.
Cranium #5
Posted 19 February 2013 - 04:29 AM
You could just have a timer event fire every once in a while, maybe, every five seconds. From that, you could recheck the size of the monitor, and if it changed, you can just redraw the screen. It's not too difficult, just a little annoying really.
Lyqyd #6
Posted 19 February 2013 - 04:46 AM
Certain things are already using the event "window_resize" to tell programs that the surface they can draw to has changed in size. ;)/>

The side being specified isn't particularly possible, as two sides could change at once. It is better to simply fetch the new size and redraw the interface.
Cloudy #7
Posted 19 February 2013 - 06:56 AM
Agreed, this would be nice.