View Source Exray.Core.Input.Mouse (Exray v0.6.0)

Input control for your mouse

Summary

Functions

Get mouse delta between frames

Get mouse position XY

Get mouse wheel movement for X or Y, whichever is larger

Get mouse wheel movement for both X and Y

Get mouse position X

Get mouse position Y

Check if a mouse button is being pressed

Check if a mouse button has been pressed once

Check if a mouse button has been released once

Check if a mouse button is NOT being pressed

Set mouse cursor

Set mouse position XY

Functions

@spec get_mouse_delta() :: mouse_delta :: Exray.Structs.Vector2.t()

Get mouse delta between frames

@spec get_mouse_position() :: mouse_position :: Exray.Structs.Vector2.t()

Get mouse position XY

@spec get_mouse_wheel_move() :: wheel_movement :: float()

Get mouse wheel movement for X or Y, whichever is larger

Link to this function

get_mouse_wheel_move_v()

View Source
@spec get_mouse_wheel_move_v() :: wheel_movement :: Exray.Structs.Vector2.t()

Get mouse wheel movement for both X and Y

@spec get_mouse_x() :: mouse_x :: integer()

Get mouse position X

@spec get_mouse_y() :: mouse_y :: integer()

Get mouse position Y

Link to this function

mouse_button_is_down?(button)

View Source
@spec mouse_button_is_down?(button :: integer()) :: is_down :: boolean()

Check if a mouse button is being pressed

Link to this function

mouse_button_is_pressed?(button)

View Source
@spec mouse_button_is_pressed?(button :: integer()) :: is_pressed :: boolean()

Check if a mouse button has been pressed once

Link to this function

mouse_button_is_released?(button)

View Source
@spec mouse_button_is_released?(button :: integer()) :: is_released :: boolean()

Check if a mouse button has been released once

Link to this function

mouse_button_is_up?(button)

View Source
@spec mouse_button_is_up?(button :: integer()) :: is_up :: boolean()

Check if a mouse button is NOT being pressed

Link to this function

set_mouse_cursor(cursor)

View Source
@spec set_mouse_cursor(cursor :: integer()) :: :ok

Set mouse cursor

Link to this function

set_mouse_offset(offset_x, offset_y)

View Source
@spec set_mouse_offset(offset_x :: integer(), offset_y :: integer()) :: :ok

Set mouse offset

Link to this function

set_mouse_position(x, y)

View Source
@spec set_mouse_position(x :: integer(), y :: integer()) :: :ok

Set mouse position XY

Link to this function

set_mouse_scale(scale_x, scale_y)

View Source
@spec set_mouse_scale(scale_x :: float(), scale_y :: float()) :: :ok

Set mouse scaling