diff options
| author | Tom Black <[email protected]> | 2017-04-08 23:17:18 -0400 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2017-04-13 15:22:05 -0400 |
| commit | 10d9acbe39a6e649e8752c3d06d1157d43b6e73a (patch) | |
| tree | 0da91cd30d4e900d4b1d5c4d0e5b0d656997811e /test/input.rb | |
| parent | 193315380ed9c714e5f78b7d1b1224cfc68ccaaa (diff) | |
| download | ruby2d-10d9acbe39a6e649e8752c3d06d1157d43b6e73a.tar.gz ruby2d-10d9acbe39a6e649e8752c3d06d1157d43b6e73a.zip | |
Add mouse events, introduce event structs
Diffstat (limited to 'test/input.rb')
| -rw-r--r-- | test/input.rb | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/test/input.rb b/test/input.rb deleted file mode 100644 index 82bce4a..0000000 --- a/test/input.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'ruby2d' - -set width: 200, height: 100, title: "Ruby 2D — Input" - -on key_down: 'a' do - puts "Key 'a' down" -end - -on key: 'b' do - puts "Key 'b' held down" -end - -on key_up: 'c' do - puts "Key 'c' up" -end - -on key_down: 'any' do - puts "A key was pressed" -end - -on_key do |key| - if key == 'd' - puts "on_key: #{key}" - end -end - -on mouse: 'any' do |x, y| - puts "Mouse clicked at: #{x}, #{y}" -end - -on key: 'escape' do - close -end - -show |
