diff options
author | red-001 <red-001@outlook.ie> | 2017-01-24 16:26:15 +0000 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-03-13 23:56:05 +0100 |
commit | c42c53fccf87a3819ca78de52f8f20c47c4fbb9f (patch) | |
tree | 223bb0b18e989cfe7eb8f7d712bd606976be2c77 /doc | |
parent | 2c19d51409ca903021e0b508e5bc15299c4e51dc (diff) | |
download | minetest-c42c53fccf87a3819ca78de52f8f20c47c4fbb9f.tar.gz minetest-c42c53fccf87a3819ca78de52f8f20c47c4fbb9f.tar.bz2 minetest-c42c53fccf87a3819ca78de52f8f20c47c4fbb9f.zip |
[CSM] Add local formspecs. (#5094)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/client_lua_api.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt index 8ce487bf8..3170f4c84 100644 --- a/doc/client_lua_api.txt +++ b/doc/client_lua_api.txt @@ -699,7 +699,10 @@ Call these functions only at load time! * Called when server modified player's HP * `minetest.register_on_damage_taken(func(hp))` * Called when player take damages - +* `minetest.register_on_formspec_input(func(formname, fields))` + * Called when a button is pressed in player's inventory form + * Newest functions are called first + * If function returns `true`, remaining functions are not called ### Sounds * `minetest.sound_play(spec, parameters)`: returns a handle * `spec` is a `SimpleSoundSpec` @@ -754,7 +757,15 @@ Call these functions only at load time! * Encodes a string in base64. * `minetest.decode_base64(string)`: returns string * Decodes a string encoded in base64. - +* `core.gettext(string) : returns string + * look up the translation of a string in the gettext message catalog +* `fgettext_ne(string, ...)` + * call core.gettext(string), replace "$1"..."$9" with the given + extra arguments and return the result +* `fgettext(string, ...)` : returns string + * same as fgettext_ne(), but calls core.formspec_escape before returning result +* `show_formspec(formname, formspec)` : returns true on success + * Shows a formspec to the player Class reference --------------- |