diff options
author | Vincent Robinson <robinsonvincent89@gmail.com> | 2021-12-30 12:54:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-30 12:54:47 -0800 |
commit | 544b9d5c72f690d6a729053616d26e023f7e0e28 (patch) | |
tree | e549d0a2eda19c5cfd76aee5bc077b95980a80e4 /doc | |
parent | 4a16ab3585dafdf4d36b2807a1ee9507be64b363 (diff) | |
download | minetest-544b9d5c72f690d6a729053616d26e023f7e0e28.tar.gz minetest-544b9d5c72f690d6a729053616d26e023f7e0e28.tar.bz2 minetest-544b9d5c72f690d6a729053616d26e023f7e0e28.zip |
Add padding[] element to formspecs (#11821)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 1950659ab..0879dcfb5 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -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 = { |