doc: Add MKXP.mouse_in_window

This commit is contained in:
Amaryllis Kulla 2022-02-01 21:56:10 +01:00
parent a651639524
commit 985cf1ad4b
1 changed files with 5 additions and 0 deletions

View File

@ -39,5 +39,10 @@ dataPathOrg=dancingdragon
dataPathApp=skyborn
```
## MKXP.mouse_in_window()
returns: Boolean
Returns true if the mouse cursor is currently within the game window, false otherwise.
## Arbitrary key states
Use `MKXP.raw_key_states` to get the current byte array of keystates, then call `#getbyte(scancode)` with `scancode` being one of the constants defined in `SDL_scancode_map.rb`. **0** means the key is released, **1** that it is pressed.