summaryrefslogtreecommitdiffhomepage
path: root/test/contains.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/contains.rb')
-rw-r--r--test/contains.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/contains.rb b/test/contains.rb
index b24b898..d95a720 100644
--- a/test/contains.rb
+++ b/test/contains.rb
@@ -2,13 +2,7 @@ require 'ruby2d'
set title: "Ruby 2D — Contains", height: 350
-if RUBY_ENGINE == 'opal'
- media = "../test/media"
- font = "sans-serif"
-else
- media = "media"
- font = "#{media}/bitstream_vera/vera.ttf"
-end
+font = 'media/bitstream_vera/vera.ttf'
objects = []
objects.push Square.new(x: 50, y: 50, size: 100)
@@ -17,8 +11,8 @@ objects.push Quad.new(x1: 350, y1: 50, x2: 500, y2: 75, x3: 450, y3: 150, x4: 37
objects.push Triangle.new(x1: 550, y1: 50, x2: 600, y2: 125, x3: 500, y3: 150)
objects.push Line.new(x1: 225, y1: 175, x2: 375, y2: 225, width: 20)
objects.push Circle.new(x: 225, y: 275, radius: 50)
-objects.push Image.new("#{media}/colors.png", x: 50, y: 200)
-objects.push Text.new("Hello", x: 450, y: 200, size: 50, font: font)
+objects.push Image.new('media/colors.png', x: 50, y: 200)
+objects.push Text.new('Hello', x: 450, y: 200, size: 50, font: font)
on :key_down do |event|
close if event.key == 'escape'