From 009e39e73b9aa003c369fe6bc88f366fdc91610e Mon Sep 17 00:00:00 2001 From: Vincent Robinson Date: Sat, 23 Jan 2021 12:46:19 -0800 Subject: FormSpec: Add list spacing, slot size, and noclip (#10083) * Add list spacing, slot size, and noclip * Simplify StyleSpec * Add test cases Co-authored-by: rubenwardy --- doc/lua_api.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 317bbe577..f751eb512 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -2226,7 +2226,8 @@ Elements * Show an inventory list if it has been sent to the client. Nothing will be shown if the inventory list is of size 0. * **Note**: With the new coordinate system, the spacing between inventory - slots is one-fourth the size of an inventory slot. + slots is one-fourth the size of an inventory slot by default. Also see + [Styling Formspecs] for changing the size of slots and spacing. ### `list[;;,;,;]` @@ -2809,6 +2810,7 @@ Some types may inherit styles from parent types. * image_button * item_image_button * label +* list * model * pwdfield, inherits from field * scrollbar @@ -2896,6 +2898,10 @@ Some types may inherit styles from parent types. * font - Sets font type. See button `font` property for more information. * font_size - Sets font size. See button `font_size` property for more information. * noclip - boolean, set to true to allow the element to exceed formspec bounds. +* list + * noclip - boolean, set to true to allow the element to exceed formspec bounds. + * size - 2d vector, sets the size of inventory slots in coordinates. + * spacing - 2d vector, sets the space between inventory slots in coordinates. * image_button (additional properties) * fgimg - standard image. Defaults to none. * fgimg_hovered - image when hovered. Defaults to fgimg when not provided. -- cgit v1.2.3