on_refresh
The on_refresh
method defines callback behavior that is triggered when a Window
is refreshed. It generates a CrystGLFW::Event::WindowRefresh
that is yielded to the block:
window = Window.new
window.on_refresh do |event|
puts "window refreshed!"
end
With this callback defined, every time window
is refreshed, it prints "window refreshed!" to standard output.
on_refresh
must be called from within a run
block definition.