mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-18 14:02:33 +00:00
Added all the callbacks to Window and GameState, removed all but one usage of global variables ().
This commit is contained in:
@@ -43,9 +43,9 @@ module CyberarmEngine
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user