View Source Exray.Core.Input.Mouse (Exray v0.2.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() :: {:ok, mouse_delta :: Exray.Structs.Vector2}

Get mouse delta between frames

@spec get_mouse_position() :: {:ok, mouse_position :: Exray.Structs.Vector2}

Get mouse position XY

@spec get_mouse_wheel_move() :: {:ok, 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() :: {:ok, wheel_movement :: Exray.Structs.Vector2}

Get mouse wheel movement for both X and Y

@spec get_mouse_x() :: {:ok, mouse_x :: integer()}

Get mouse position X

@spec get_mouse_y() :: {:ok, mouse_y :: integer()}

Get mouse position Y

Link to this function

is_mouse_button_down(button)

View Source
@spec is_mouse_button_down(button :: integer()) :: {:ok, is_down :: boolean()}

Check if a mouse button is being pressed

Link to this function

is_mouse_button_pressed(button)

View Source
@spec is_mouse_button_pressed(button :: integer()) :: {:ok, is_pressed :: boolean()}

Check if a mouse button has been pressed once

Link to this function

is_mouse_button_released(button)

View Source
@spec is_mouse_button_released(button :: integer()) :: {:ok, is_released :: boolean()}

Check if a mouse button has been released once

Link to this function

is_mouse_button_up(button)

View Source
@spec is_mouse_button_up(button :: integer()) :: {:ok, 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