33 lines
985 B
JavaScript
33 lines
985 B
JavaScript
var input = this
|
|
|
|
input.mouse_show[prosperon.DOC] = `Show or hide the mouse cursor. Pass true to show, false to hide.
|
|
|
|
:param show: Boolean. True to show, false to hide.
|
|
:return: None
|
|
`
|
|
|
|
input.mouse_lock[prosperon.DOC] = `Capture or release the mouse, confining it within the window if locked.
|
|
|
|
:param lock: Boolean. True to lock, false to unlock.
|
|
:return: None
|
|
`
|
|
|
|
input.keyname[prosperon.DOC] = `Given a numeric keycode, return the corresponding key name (e.g., from SDL).
|
|
|
|
:param keycode: A numeric SDL keycode.
|
|
:return: A string with the key name.
|
|
`
|
|
|
|
input.keymod[prosperon.DOC] = `Return an object describing the current modifier keys, e.g. {shift:true, ctrl:true}.
|
|
|
|
:return: An object with boolean fields for each modifier key.
|
|
`
|
|
|
|
input.mousestate[prosperon.DOC] = `Return an object describing the current mouse state, including x,y coordinates
|
|
and booleans for pressed buttons (left, middle, right, x1, x2).
|
|
|
|
:return: Object { x, y, left, middle, right, x1, x2 }
|
|
`
|
|
|
|
return input
|