aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDS <vorunbekannt75@web.de>2020-04-13 10:50:07 +0200
committerGitHub <noreply@github.com>2020-04-13 10:50:07 +0200
commit0ac999ded725f8efcd26db284161683e37efeecf (patch)
tree24dfe208152ffa5f28d912d1de8e65c13c3704d6 /doc
parent6cf15cf872cc9ce76990d83d380ca3c4b7485eb1 (diff)
downloadminetest-0ac999ded725f8efcd26db284161683e37efeecf.tar.gz
minetest-0ac999ded725f8efcd26db284161683e37efeecf.tar.bz2
minetest-0ac999ded725f8efcd26db284161683e37efeecf.zip
Add scroll_container formspec element (redo) (#9101)
New formspec elements: - `scroll_container[<X>,<Y>;<W>,<H>;<scrollbar name>;<orientation>;<scroll factor>]` - `scroll_container_end[]` Other elements can be embedded in this element. Scrollbar must be placed manually.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index dff6c728e..f43987cd8 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2102,6 +2102,26 @@ Elements
* End of a container, following elements are no longer relative to this
container.
+### `scroll_container[<X>,<Y>;<W>,<H>;<scrollbar name>;<orientation>;<scroll factor>]`
+
+* Start of a scroll_container block. All contained elements will ...
+ * take the scroll_container coordinate as position origin,
+ * be additionally moved by the current value of the scrollbar with the name
+ `scrollbar name` times `scroll factor` along the orientation `orientation` and
+ * be clipped to the rectangle defined by `X`, `Y`, `W` and `H`.
+* `orientation`: possible values are `vertical` and `horizontal`.
+* `scroll factor`: optional, defaults to `0.1`.
+* Nesting is possible.
+* Some elements might work a little different if they are in a scroll_container.
+* Note: If you want the scroll_container to actually work, you also need to add a
+ scrollbar element with the specified name. Furthermore, it is highly recommended
+ to use a scrollbaroptions element on this scrollbar.
+
+### `scroll_container_end[]`
+
+* End of a scroll_container, following elements are no longer bound to this
+ container.
+
### `list[<inventory location>;<list name>;<X>,<Y>;<W>,<H>;]`
* Show an inventory list if it has been sent to the client. Nothing will