summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorTom Black <[email protected]>2016-08-28 18:10:05 -0400
committerGitHub <[email protected]>2016-08-28 18:10:05 -0400
commit31aebd27ec78e6b751d69d2fb360187270b1be00 (patch)
tree29c35b0dccbd4b2ac0108f1c402be568e06205b7 /tests
parent91676a0713c0dfd9a11c2b2b1ba0d50eb5d60534 (diff)
parent4206c7d84977e40d092610fe35e2d937d693bd1c (diff)
downloadruby2d-31aebd27ec78e6b751d69d2fb360187270b1be00.tar.gz
ruby2d-31aebd27ec78e6b751d69d2fb360187270b1be00.zip
Merge pull request #18 from mikeappell/change-text-dynamically
Made Text objects changeable dynamically
Diffstat (limited to 'tests')
-rw-r--r--tests/testcard.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/testcard.rb b/tests/testcard.rb
index e96c217..c9204cc 100644
--- a/tests/testcard.rb
+++ b/tests/testcard.rb
@@ -135,9 +135,11 @@ Image.new(590, 400, "media/image.bmp")
# Text
Text.new(0, 250) # Default message
-t = Text.new(0, 275, 30, "Hello Ruby 2D!", "media/bitstream_vera/vera.ttf")
-t.color = 'red' # Doesn't work yet
-fps = Text.new(0, 325, 20)
+t1 = Text.new(0, 275, 30, "Hello Ruby 2D!", "media/bitstream_vera/vera.ttf")
+t1.color = 'red' # Doesn't work yet
+t2 = Text.new(0, 325, 20) # Default message
+t2.text = "Text can be changed"
+fps = Text.new(0, 375, 20)
# Pointer for mouse
pointer = Square.new(0, 0, 10, 'white')