lib/cyberarm_engine/objects/text.rb in cyberarm_engine-0.4.0 vs lib/cyberarm_engine/objects/text.rb in cyberarm_engine-0.5.0
- old
+ new
@@ -4,10 +4,10 @@
attr_accessor :x, :y, :z, :size, :factor_x, :factor_y, :color, :shadow, :shadow_size, :options
attr_reader :text, :textobject
def initialize(text, options={})
- @text = text || ""
+ @text = text.to_s || ""
@options = options
@size = options[:size] || 18
@font = options[:font] || "sans-serif"#Gosu.default_font_name
@x = options[:x] || 0
@y = options[:y] || 0