1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

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 <rw@rubenwardy.com>
This commit is contained in:
Vincent Robinson 2021-01-23 12:46:19 -08:00 committed by GitHub
parent 4c76239818
commit 009e39e73b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 78 additions and 22 deletions

View file

@ -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[<inventory location>;<list name>;<X>,<Y>;<W>,<H>;<starting item index>]`
@ -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.