lib/cyberarm_engine/ui/label.rb in cyberarm_engine-0.6.0 vs lib/cyberarm_engine/ui/label.rb in cyberarm_engine-0.7.0
- old
+ new
@@ -15,9 +15,15 @@
def clicked_left_mouse_button(sender, x, y)
@block.call(self) if @block
end
def recalculate
+ unless @visible
+ @width = 0
+ @height= 0
+ return
+ end
+
@width = @text.width.round
@height= @text.height.round
@text.x = @border_thickness_left + @padding_left + @x
@text.y = @border_thickness_top + @padding_top + @y
\ No newline at end of file