diff options
Diffstat (limited to 'doc/menu_lua_api.txt')
-rw-r--r-- | doc/menu_lua_api.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/menu_lua_api.txt b/doc/menu_lua_api.txt index 2c76c6b8f..a2f9c3f5b 100644 --- a/doc/menu_lua_api.txt +++ b/doc/menu_lua_api.txt @@ -1,4 +1,4 @@ -Minetest Lua Mainmenu API Reference 5.0.1 +Minetest Lua Mainmenu API Reference 5.1.0 ========================================= Introduction @@ -79,6 +79,8 @@ core.explode_table_event(string) -> table core.explode_textlist_event(string) -> table ^ returns e.g. {type="CHG", index=1} ^ type: "INV" (no row selected), "CHG" (selected) or "DCL" (double-click) +core.set_formspec_prepend(formspec) +^ string to be added to every mainmenu formspec, to be used for theming. GUI: core.set_background(type, texturepath,[tile],[minsize]) @@ -89,13 +91,14 @@ core.set_background(type, texturepath,[tile],[minsize]) core.set_clouds(<true/false>) core.set_topleft_text(text) core.show_keys_menu() -core.file_open_dialog(formname,caption) -^ shows a file open dialog +core.show_path_select_dialog(formname, caption, is_file_select) +^ shows a path select dialog ^ formname is base name of dialog response returned in fields ^ -if dialog was accepted "_accepted" -^^ will be added to fieldname containing the path +^ will be added to fieldname containing the path ^ -if dialog was canceled "_cancelled" ^ will be added to fieldname value is set to formname itself +^ if `is_file_select` is `true`, a file and not a folder will be selected ^ returns nil or selected file/folder core.get_screen_info() ^ returns { @@ -240,4 +243,4 @@ Limitations of Async operations -No access to global lua variables, don't even try -Limited set of available functions e.g. No access to functions modifying menu like core.start,core.close, - core.file_open_dialog + core.show_path_select_dialog |