Skip to content

Latest commit

 

History

History
83 lines (50 loc) · 1.55 KB

File metadata and controls

83 lines (50 loc) · 1.55 KB

retro-engine / Exports / MouseState

Class: MouseState

Class for handling mouse input.

Table of contents

Properties

Methods

Properties

btns

The map of mouse button states.

Static Private btns: Map<number, boolean>

Defined in

src/mouseState.ts:7


screen_pos

The position of the mouse on the screen, relative to the top-left corner.

Static screen_pos: Object

Type declaration

Name Type
x number
y number

Defined in

src/mouseState.ts:5


world_pos

The position of the mouse in the world.

Static world_pos: Object

Type declaration

Name Type
x number
y number

Defined in

src/mouseState.ts:6

Methods

isPressed

Checks if a mouse button is currently pressed.

Static isPressed(btn): boolean

Parameters

Name Type
btn number

Returns

boolean

Defined in

src/mouseState.ts:55