module Oid::Service::Input
Included Modules
Direct including types
Defined in:
oid/service/input.crInstance Method Summary
-
#key_down?(key : Oid::Enum::Key) : Bool
Detect if a key is being pressed
-
#key_pressed?(key : Oid::Enum::Key) : Bool
Detect if a key has been pressed once
-
#key_released?(key : Oid::Enum::Key) : Bool
Detect if a key has been released once
-
#key_up?(key : Oid::Enum::Key) : Bool
Detect if a key is NOT being pressed
-
#latest_key_pressed? : Oid::Enum::Key | Nil
Get latest key pressed
-
#mouse_button_down?(button) : Bool
Detect if a mouse button is being pressed
-
#mouse_button_pressed?(button) : Bool
Detect if a mouse button has been pressed once
-
#mouse_button_released?(button) : Bool
Detect if a mouse button has been released once
-
#mouse_button_up?(button) : Bool
Detect if a mouse button is NOT being pressed
-
#mouse_position : Oid::Vector2
Returns mouse position XY
-
#mouse_wheel_move : Float64
Returns mouse wheel move
-
#mouse_x : Float64
Returns mouse position X
-
#mouse_y : Float64
Returns mouse position Y
-
#touch_position : Oid::Vector2
Returns touch position XY for a touch point index (relative to screen size)
-
#touch_x : Float64
Returns touch position X for touch point 0 (relative to screen size)
-
#touch_y : Float64
Returns touch position Y for touch point 0 (relative to screen size)
Constructor methods inherited from module Oid::Service
new(pull : JSON::PullParser)
new
Instance Method Detail
Detect if a mouse button has been released once
Returns touch position XY for a touch point index (relative to screen size)
Returns touch position X for touch point 0 (relative to screen size)
Returns touch position Y for touch point 0 (relative to screen size)