summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--examples/simple.rb13
-rw-r--r--examples/triangle.rb10
-rw-r--r--tests/input.rb (renamed from examples/input.rb)6
3 files changed, 5 insertions, 24 deletions
diff --git a/examples/simple.rb b/examples/simple.rb
deleted file mode 100644
index ca8e99f..0000000
--- a/examples/simple.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-require 'ruby2d'
-
-# Set the window size
-set width: 300, height: 200
-
-# Create a new shape
-s = Square.new
-
-# Give it some color
-s.color = 'red'
-
-# Show the window
-show
diff --git a/examples/triangle.rb b/examples/triangle.rb
deleted file mode 100644
index 71f0bbf..0000000
--- a/examples/triangle.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-require 'ruby2d'
-
-Triangle.new(320, 50, 540, 430, 100, 430,
-[
- [1.0, 0, 0, 1.0],
- [0, 1.0, 0, 1.0],
- [0, 0, 1.0, 1.0]
-])
-
-show
diff --git a/examples/input.rb b/tests/input.rb
index a39a29c..66de596 100644
--- a/examples/input.rb
+++ b/tests/input.rb
@@ -3,7 +3,11 @@ require 'ruby2d'
set width: 200, height: 100
on key: 'a' do
- puts "a pressed!"
+ puts "a key"
+end
+
+on key_down: 'p' do
+ puts "p key down"
end
show