on_move

The on_move method defines callback behavior that is triggered when a Window is moved. It generates a CrystGLFW::Event::WindowMove that is yielded to the block:

window = Window.new

window.on_move do |event|
  puts "window moved to #{event.position}"
end

With this callback defined, every time window is moved, its new location is printed to standard output.

on_move must be called from within a run block definition.

results matching ""

    No results matching ""