class RayLib::InputService
- RayLib::InputService
- Reference
- Object
Included Modules
Defined in:
raylib/services/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)
Instance methods inherited from module Oid::Service::Input
key_down?(key : Oid::Enum::Key) : Bool
key_down?,
key_pressed?(key : Oid::Enum::Key) : Bool
key_pressed?,
key_released?(key : Oid::Enum::Key) : Bool
key_released?,
key_up?(key : Oid::Enum::Key) : Bool
key_up?,
latest_key_pressed? : Oid::Enum::Key | Nil
latest_key_pressed?,
mouse_button_down?(button) : Bool
mouse_button_down?,
mouse_button_pressed?(button) : Bool
mouse_button_pressed?,
mouse_button_released?(button) : Bool
mouse_button_released?,
mouse_button_up?(button) : Bool
mouse_button_up?,
mouse_position : Oid::Vector2
mouse_position,
mouse_wheel_move : Float64
mouse_wheel_move,
mouse_x : Float64
mouse_x,
mouse_y : Float64
mouse_y,
touch_position : Oid::Vector2
touch_position,
touch_x : Float64
touch_x,
touch_y : Float64
touch_y
Constructor methods inherited from module Oid::Service
new(pull : JSON::PullParser)
new
Instance Method Detail
Detect if a key is being pressed
Detect if a key has been pressed once
Detect if a key has been released once
Detect if a key is NOT being pressed
Get latest key pressed
Detect if a mouse button is being pressed
Detect if a mouse button has been pressed once
Detect if a mouse button has been released once
Detect if a mouse button is NOT being pressed
Returns mouse position XY
Returns mouse wheel move
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)