lib/cyberarm_engine/text.rb in cyberarm_engine-0.20.0 vs lib/cyberarm_engine/text.rb in cyberarm_engine-0.21.0
- old
+ new
@@ -41,12 +41,12 @@
if @alignment
case @alignment
when :left
@x = 0 + BUTTON_PADDING
when :center
- @x = ($window.width / 2) - (@textobject.text_width(@text) / 2)
+ @x = (CyberarmEngine::Window.instance.width / 2) - (@textobject.text_width(@text) / 2)
when :right
- @x = $window.width - BUTTON_PADDING - @textobject.text_width(@text)
+ @x = CyberarmEngine::Window.instance.width - BUTTON_PADDING - @textobject.text_width(@text)
end
end
end
def check_cache(size, font_name)