summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ruby2d/text.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ruby2d/text.rb b/lib/ruby2d/text.rb
index 22325ff..ca27ab8 100644
--- a/lib/ruby2d/text.rb
+++ b/lib/ruby2d/text.rb
@@ -16,12 +16,17 @@ module Ruby2D
@type_id = 5
@x, @y, @size = x, y, size
- @text = text
+ @text = text.to_s
@color = Color.new(c)
init
add
end
+ def text=(msg)
+ @text = msg.to_s
+ ext_text_set(@text)
+ end
+
def color=(c)
@color = Color.new(c)
end