summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorv-rob <robinsonvincent89@gmail.com>2020-03-01 06:39:57 -0800
committerGitHub <noreply@github.com>2020-03-01 14:39:57 +0000
commit7dffd08c1a068e5e0748a046fd8a1e884947b597 (patch)
tree867a61698d93c6b107d4432059b8245cabd5f3f3 /doc/lua_api.txt
parent0c08f948d7014e66d5a79d7584c03164af2edd93 (diff)
downloadminetest-7dffd08c1a068e5e0748a046fd8a1e884947b597.tar.gz
minetest-7dffd08c1a068e5e0748a046fd8a1e884947b597.tar.bz2
minetest-7dffd08c1a068e5e0748a046fd8a1e884947b597.zip
Add multiple element selection to `style` and `style_type` (#9380)
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt17
1 files changed, 11 insertions, 6 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 6ff7f802a..4b7132828 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2495,16 +2495,16 @@ Elements
* `span=<value>`: number of following columns to affect
(default: infinite).
-### `style[<name>;<prop1>;<prop2>;...]`
+### `style[<name 1>,<name 2>,...;<prop1>;<prop2>;...]`
-* Set the style for the named element `name`.
+* Set the style for the named element(s) `name`.
* Note: this **must** be before the element is defined.
* See [Styling Formspecs].
-### `style_type[<type>;<prop1>;<prop2>;...]`
+### `style_type[<type 1>,<type 2>,...;<prop1>;<prop2>;...]`
-* Sets the style for all elements of type `type` which appear after this element.
+* Sets the style for all elements of type(s) `type` which appear after this element.
* See [Styling Formspecs].
Migrating to Real Coordinates
@@ -2547,13 +2547,18 @@ Styling Formspecs
Formspec elements can be themed using the style elements:
- style[<name>;<prop1>;<prop2>;...]
- style_type[<type>;<prop1>;<prop2>;...]
+ style[<name 1>,<name 2>,...;<prop1>;<prop2>;...]
+ style_type[<type 1>,<type 2>,...;<prop1>;<prop2>;...]
Where a prop is:
property_name=property_value
+A name/type can optionally be a comma separated list of names/types, like so:
+
+ world_delete,world_create,world_configure
+ button,image_button
+
For example:
style_type[button;bgcolor=#006699]