From 5bead7daaf1782ecb142a57ac57bd8ba405ba150 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sat, 28 Nov 2020 20:13:20 +0100 Subject: Added minetest.close_formspec --- doc/client_lua_api.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt index f14b8eceb..9ce553ca1 100644 --- a/doc/client_lua_api.txt +++ b/doc/client_lua_api.txt @@ -1107,6 +1107,14 @@ Passed to `HTTPApiTable.fetch` callback. Returned by * Reference to the camera object. See [`Camera`](#camera) class reference for methods. * `minetest.show_formspec(formname, formspec)` : returns true on success * Shows a formspec to the player +* `minetest.close_formspec(formname)` + * `formname`: has to exactly match the one given in `show_formspec`, or the + formspec will not close. + * calling `show_formspec(formname, "")` is equal to this + expression. + * to close a formspec regardless of the formname, call + `minetest.close_formspec("")`. + **USE THIS ONLY WHEN ABSOLUTELY NECESSARY!** * `minetest.display_chat_message(message)` returns true on success * Shows a chat message to the current player. -- cgit v1.2.3