diff --git a/bindings/ruby/testing/window-demo.rb b/bindings/ruby/testing/window-demo.rb new file mode 100644 index 00000000..3912dd03 --- /dev/null +++ b/bindings/ruby/testing/window-demo.rb @@ -0,0 +1,17 @@ +require 'sfml/system' +require 'sfml/window' + +app = SFML::Window.new( SFML::VideoMode.new( 800, 600 ), "My Ruby SFML" ) +input = app.input + +while app.open? + while event = app.get_event + if event.type == SFML::Event::Closed + app.close + end + end + + p [input.mouse_x, input.mouse_y] + + app.display +end