summaryrefslogtreecommitdiffhomepage
path: root/test/input.rb
diff options
context:
space:
mode:
authorTom Black <[email protected]>2017-04-08 23:17:18 -0400
committerTom Black <[email protected]>2017-04-13 15:22:05 -0400
commit10d9acbe39a6e649e8752c3d06d1157d43b6e73a (patch)
tree0da91cd30d4e900d4b1d5c4d0e5b0d656997811e /test/input.rb
parent193315380ed9c714e5f78b7d1b1224cfc68ccaaa (diff)
downloadruby2d-10d9acbe39a6e649e8752c3d06d1157d43b6e73a.tar.gz
ruby2d-10d9acbe39a6e649e8752c3d06d1157d43b6e73a.zip
Add mouse events, introduce event structs
Diffstat (limited to 'test/input.rb')
-rw-r--r--test/input.rb35
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