CrystGLFW::Event::WindowResize
A CrystGLFW::Event::WindowResize
is generated when a Window
is resized. It is yielded to the block defined by on_resize
.
window = Window.new
window.on_resize do |event|
puts "window resized to #{event.size}"
end
window
You can retrieve the event's associated Window
using the window
method:
event.window # => CrystGLFW::Window
size
You can retrieve the new size of the Window
using the size
method:
event.size # => {width: Int32, height: Int32}