mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-16 16:12:35 +00:00
Replaced usage of with CommonMethods.window (which uses ), refactored InputMapper to match actions to keys and visa-versa, removed categories from InputMapper, moved input mappings from Camera and Player into InputMapper (for now.)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
class Text
|
||||
include IMICFPS::CommonMethods
|
||||
CACHE = {}
|
||||
|
||||
attr_accessor :text, :x, :y, :z, :size, :factor_x, :factor_y, :color, :shadow, :shadow_size, :options
|
||||
@@ -29,9 +30,9 @@ class Text
|
||||
when :left
|
||||
@x = 0+BUTTON_PADDING
|
||||
when :center
|
||||
@x = ($window.width/2)-(@textobject.text_width(@text)/2)
|
||||
@x = (window.width/2)-(@textobject.text_width(@text)/2)
|
||||
when :right
|
||||
@x = $window.width-BUTTON_PADDING-@textobject.text_width(@text)
|
||||
@x = window.width-BUTTON_PADDING-@textobject.text_width(@text)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user