lib/cyberarm_engine/objects/text.rb in cyberarm_engine-0.5.0 vs lib/cyberarm_engine/objects/text.rb in cyberarm_engine-0.5.1
- old
+ new
@@ -70,10 +70,10 @@
def width
textobject.text_width(@text)
end
def height
- (@text.lines.count) * textobject.height
+ @text.lines.count > 0 ? (@text.lines.count) * textobject.height : @textobject.height
end
def draw
if @shadow && !ARGV.join.include?("--no-shadow")
@shadow_alpha = 30 if @color.alpha > 30