Mouse

object Mouse

The current mouse and cursor state.

Types

Link copied to clipboard
value class Button

Represents a mouse button that can be pressed.

Link copied to clipboard
value class Cursor

The currently displayed icon over the cursor.

Properties

Link copied to clipboard

The mouse movement along the X axis between frames.

Link copied to clipboard

The mouse movement along the Y axis between frames.

Link copied to clipboard

Whether the cursor is enabled on the screen.

Link copied to clipboard

Whether the cursor is hidden.

Link copied to clipboard

Indicates whether the cursor is currently on the screen.

Link copied to clipboard
var mouseX: Int

The current X position of the mouse.

Link copied to clipboard
var mouseY: Int

The current Y position of the mouse.

Link copied to clipboard

The X movement for the mouse wheel.

Link copied to clipboard

The Y movement for the mouse wheel.

Functions

Link copied to clipboard
fun isDown(button: Mouse.Button): ERROR CLASS: Unresolved name: IsMouseButtonDown

Whether a mouse button is currently in down state, or being pressed.

Link copied to clipboard
fun isPressed(button: Mouse.Button): ERROR CLASS: Unresolved name: IsMouseButtonPressed

Whether a mouse button was pressed once.

Link copied to clipboard
fun isReleased(button: Mouse.Button): ERROR CLASS: Unresolved name: IsMouseButtonReleased

Whether a mouse button was released once.

Link copied to clipboard
fun isUp(button: Mouse.Button): ERROR CLASS: Unresolved name: IsMouseButtonUp

Whether a mouse button is currently in up state, or is not being pressed.

Link copied to clipboard
fun setCursor(cursor: Mouse.Cursor): ERROR CLASS: Unresolved name: SetMouseCursor

Sets the icon of the mouse.

Link copied to clipboard
fun setScale(x: Float, y: Float): ERROR CLASS: Unresolved name: SetMouseScale

Sets the size scale of the mouse pointer.