aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorVincent Robinson <robinsonvincent89@gmail.com>2022-07-03 05:52:26 -0700
committerGitHub <noreply@github.com>2022-07-03 08:52:26 -0400
commitf7bcf7fa46a634653e50f9e580faf2a53ab50e88 (patch)
treefc951aac79d80b0a1408d97dd51e8505317527e1 /doc
parent5a562a597cb8d1b71c5e0c1247836fe21ebccc56 (diff)
downloadminetest-f7bcf7fa46a634653e50f9e580faf2a53ab50e88.tar.gz
minetest-f7bcf7fa46a634653e50f9e580faf2a53ab50e88.tar.bz2
minetest-f7bcf7fa46a634653e50f9e580faf2a53ab50e88.zip
FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453)
* FormSpec: 9-slice images and animated_images * Add fgimg_middle; clean up code * Address issues, add tests * Fix stupid error; bump formspec version * Re-add image[] elements without a size
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt21
1 files changed, 15 insertions, 6 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 994a30981..24de70a3b 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -2310,6 +2310,8 @@ Version History
* Allow dropdown indexing events
* Formspec version 5 (5.5.0):
* Added padding[] element
+* Formspec version 6 (5.6.0):
+ * Add nine-slice images, animated_images, and fgimg_middle
Elements
--------
@@ -2474,20 +2476,25 @@ Elements
* `bgcolor` tooltip background color as `ColorString` (optional)
* `fontcolor` tooltip font color as `ColorString` (optional)
-### `image[<X>,<Y>;<W>,<H>;<texture name>]`
+### `image[<X>,<Y>;<W>,<H>;<texture name>;<middle>]`
-* Show an image
+* Show an image.
+* `middle` (optional): Makes the image render in 9-sliced mode and defines the middle rect.
+ * Requires formspec version >= 6.
+ * See `background9[]` documentation for more information.
-### `animated_image[<X>,<Y>;<W>,<H>;<name>;<texture name>;<frame count>;<frame duration>;<frame start>]`
+### `animated_image[<X>,<Y>;<W>,<H>;<name>;<texture name>;<frame count>;<frame duration>;<frame start>;<middle>]`
* Show an animated image. The image is drawn like a "vertical_frames" tile
- animation (See [Tile animation definition]), but uses a frame count/duration
- for simplicity
+ animation (See [Tile animation definition]), but uses a frame count/duration for simplicity
* `name`: Element name to send when an event occurs. The event value is the index of the current frame.
* `texture name`: The image to use.
* `frame count`: The number of frames animating the image.
* `frame duration`: Milliseconds between each frame. `0` means the frames don't advance.
-* `frame start` (Optional): The index of the frame to start on. Default `1`.
+* `frame start` (optional): The index of the frame to start on. Default `1`.
+* `middle` (optional): Makes the image render in 9-sliced mode and defines the middle rect.
+ * Requires formspec version >= 6.
+ * See `background9[]` documentation for more information.
### `model[<X>,<Y>;<W>,<H>;<name>;<mesh>;<textures>;<rotation X,Y>;<continuous>;<mouse control>;<frame loop range>;<animation speed>]`
@@ -3101,6 +3108,8 @@ Some types may inherit styles from parent types.
* This is deprecated, use states instead.
* fgimg_pressed - image when pressed. Defaults to fgimg when not provided.
* This is deprecated, use states instead.
+ * fgimg_middle - Makes the fgimg textures render in 9-sliced mode and defines the middle rect.
+ See background9[] documentation for more details.
* NOTE: The parameters of any given image_button will take precedence over fgimg/fgimg_pressed
* sound - a sound to be played when triggered.
* scrollbar