summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-11-22 17:15:22 +0100
committerZeno- <kde.psych@gmail.com>2016-11-23 02:15:22 +1000
commit0d1c9598a0d2a4f21dc57de32efca2dc52b6b146 (patch)
treeea7280a8407472128ae90e1e4bb5ed3155392b19 /doc/lua_api.txt
parentdbeb322f62bfdd431365622a6f5ddfae062c0d31 (diff)
downloadminetest-0d1c9598a0d2a4f21dc57de32efca2dc52b6b146.tar.gz
minetest-0d1c9598a0d2a4f21dc57de32efca2dc52b6b146.tar.bz2
minetest-0d1c9598a0d2a4f21dc57de32efca2dc52b6b146.zip
Make supplying empty formspec strings close the formspec (#4737)
This will only happen if the formname matches or if formname is "".
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 80e66020d..760a829d3 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2316,6 +2316,13 @@ and `minetest.auth_reload` call the authetification handler.
* `formname`: name passed to `on_player_receive_fields` callbacks.
It should follow the `"modname:<whatever>"` naming convention
* `formspec`: formspec to display
+* `minetest.close_formspec(playername, formname)`
+ * `playername`: name of player to close formspec
+ * `formname`: has to exactly match the one given in show_formspec, or the formspec will
+ not close.
+ * calling show_formspec(playername, formname, "") is equal to this expression
+ * to close a formspec regardless of the formname, call
+ minetest.close_formspec(playername, ""). USE THIS ONLY WHEN ABSOLUTELY NECESSARY!
* `minetest.formspec_escape(string)`: returns a string
* escapes the characters "[", "]", "\", "," and ";", which can not be used in formspecs
* `minetest.explode_table_event(string)`: returns a table