CrystGLFW::Event::WindowMove
A CrystGLFW::Event::WindowMove
is generated when a Window
is moved. It is yielded to the block defined by on_move
.
window = Window.new
window.on_move do |event|
puts "window moved to #{event.position}"
end
window
You can retrieve the event's associated Window
using the window
method:
event.window # => CrystGLFW::Window
position
You can retrieve the new coordinates of the Window
using the position
method:
event.position # => {x: Int32, y: Int32}