summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ruby2d/text.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ruby2d/text.rb b/lib/ruby2d/text.rb
index a695b31..9ba4e41 100644
--- a/lib/ruby2d/text.rb
+++ b/lib/ruby2d/text.rb
@@ -2,11 +2,11 @@
module Ruby2D
class Text
-
+
attr_accessor :x, :y, :size, :text
def initialize(x=0, y=0, size=20, msg="Hello World!", font="Arial", c="white")
-
+
if File.exists? font
@font = font
else
@@ -29,7 +29,7 @@ module Ruby2D
end
def text=(t)
-
+ @text = t
end
def remove
@@ -43,7 +43,7 @@ module Ruby2D
def resolve_path(font)
if RUBY_PLATFORM =~ /darwin/
font_path = "/Library/Fonts/#{font}.ttf"
- else
+ else
# Linux
font_path = "/usr/share/fonts/truetype/#{font}.ttf"
end