1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Add padding[] element to formspecs (#11821)

This commit is contained in:
Vincent Robinson 2021-12-30 12:54:47 -08:00 committed by GitHub
parent 4a16ab3585
commit 544b9d5c72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 149 additions and 24 deletions

View file

@ -117,7 +117,7 @@ Menu music
-----------
Games can provide custom main menu music. They are put inside a `menu`
directory inside the game directory.
directory inside the game directory.
The music files are named `theme.ogg`.
If you want to specify multiple music files for one game, add additional
@ -2326,9 +2326,20 @@ Elements
* `position` and `anchor` elements need suitable values to avoid a formspec
extending off the game window due to particular game window sizes.
### `no_prepend[]`
### `padding[<X>,<Y>]`
* Must be used after the `size`, `position`, and `anchor` elements (if present).
* Defines how much space is padded around the formspec if the formspec tries to
increase past the size of the screen and coordinates have to be shrunk.
* For X and Y, 0.0 represents no padding (the formspec can touch the edge of the
screen), and 0.5 represents half the screen (which forces the coordinate size
to 0). If negative, the formspec can extend off the edge of the screen.
* Defaults to [0.05, 0.05].
### `no_prepend[]`
* Must be used after the `size`, `position`, `anchor`, and `padding` elements
(if present).
* Disables player:set_formspec_prepend() from applying to this formspec.
### `real_coordinates[<bool>]`
@ -7915,7 +7926,7 @@ Used by `minetest.register_node`.
items = {"default:sand", "default:desert_sand"},
},
{
-- Only drop if using an item in the "magicwand" group, or
-- Only drop if using an item in the "magicwand" group, or
-- an item that is in both the "pickaxe" and the "lucky"
-- groups.
tool_groups = {