No matching definitions.

raylib/input

src/raylib/input.tur
defn

is-key-down

(is-key-down [key :int] :bool)

return true while the given key is held.

keyRaylib KeyboardKey integer code

true while the key is held down.

(is-key-down 65)  ; A key

Since: P3

defn

is-key-pressed

(is-key-pressed [key :int] :bool)

return true on the frame the key is first pressed.

keyRaylib KeyboardKey integer code

true on the first frame the key is pressed.

(is-key-pressed 256)  ; ESC

Since: P3

defn

is-key-released

(is-key-released [key :int] :bool)

return true on the frame the key is released.

keyRaylib KeyboardKey integer code

true on the frame the key transitions from down to up.

(is-key-released 32)  ; SPACE

Since: P3

defn

is-mouse-button-down

(is-mouse-button-down [button :int] :bool)

return true while a mouse button is held.

buttonbutton code (0=LEFT 1=RIGHT 2=MIDDLE)

true while the button is held.

(is-mouse-button-down 0)  ; left button

Since: P3

defn

is-mouse-button-pressed

(is-mouse-button-pressed [button :int] :bool)

return true on the frame a mouse button is first pressed.

buttonbutton code (0=LEFT 1=RIGHT 2=MIDDLE)

true on the first frame the button is pressed.

(is-mouse-button-pressed 0)

Since: P3

defn

get-mouse-position

(get-mouse-position :int)

return the current mouse position as a Vector2 handle.

Heap-allocated Vector2 handle; x=column y=row in window pixels.

(let [pos (get-mouse-position)] (draw-circle-v pos 10.0 (red)))

Since: P3

defn

get-mouse-delta

(get-mouse-delta :int)

return the mouse movement since the last frame as a Vector2 handle.

Heap-allocated Vector2 handle; x=dx y=dy in pixels.

(let [d (get-mouse-delta)] ...)

Since: P3

defn

get-mouse-wheel-move

(get-mouse-wheel-move :float)

return the mouse wheel scroll amount for this frame.

Scroll delta as :float; positive = scroll up, negative = scroll down.

(let [scroll (get-mouse-wheel-move)] ...)

Since: P3