mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
add API documentation to controls
This commit is contained in:
parent
52939ff6a4
commit
e56d9d2ab8
1 changed files with 23 additions and 0 deletions
23
mods/CORE/controls/API.md
Normal file
23
mods/CORE/controls/API.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# controls
|
||||
|
||||
## controls.players
|
||||
Table containing player controls at runtime.
|
||||
WARNING: Never use this table in writing
|
||||
|
||||
## controls.register_on_press(func)
|
||||
Register a function that will be executed with (player, keyname) every time a player press a key.
|
||||
|
||||
## controls.registered_on_press
|
||||
Table containing functions registered with controls.register_on_press().
|
||||
|
||||
## controls.register_on_release(func)
|
||||
Register a function that will be executed with (player, keyname, clock_from_last_press) every time a player release a key.
|
||||
|
||||
## controls.registered_on_release
|
||||
Table containing functions registered with controls.register_on_release().
|
||||
|
||||
## controls.register_on_hold(func)
|
||||
Register a function that will be executed with (player, keyname, clock_from_start_hold) every time a player hold a key.
|
||||
|
||||
## controls.registered_on_hold
|
||||
Table containing functions registered with controls.register_on_hold().
|
Loading…
Reference in a new issue