summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-06-19 18:17:35 +0200
committersapier <Sapier at GMX dot net>2014-07-16 15:02:56 +0200
commit65b8b524c02df853163fc1284a00a684a046d67c (patch)
tree2d5262f153efcd5740096edd690472a2b4eaa4a3 /doc/lua_api.txt
parent903d343b08df17c88eafdd698af5b9f73ef6e389 (diff)
downloadminetest-65b8b524c02df853163fc1284a00a684a046d67c.tar.gz
minetest-65b8b524c02df853163fc1284a00a684a046d67c.tar.bz2
minetest-65b8b524c02df853163fc1284a00a684a046d67c.zip
Add srollbar formspec element
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 81cdb3258..28509a267 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1061,6 +1061,9 @@ box[<X>,<Y>;<W>,<H>;<color>]
dropdown[<X>,<Y>;<W>;<name>;<item 1>,<item 2>, ...,<item n>;<selected idx>]
^ show a dropdown field
+^ IMPORTANT NOTE: There are two different operation modes:
+^ 1) handle directly on change (only changed dropdown is submitted)
+^ 2) read the value on pressing a button (all dropdown values are available)
^ x and y position of dropdown
^ width of dropdown
^ fieldname data is transfered to Lua
@@ -1075,6 +1078,18 @@ checkbox[<X>,<Y>;<name>;<label>;<selected>;<tooltip>]
^ selected (optional) true/false
^ tooltip (optional)
+scrollbar[<X>,<Y>;<W>,<H>;<orientation>;<name>;<value>]
+^ show a scrollbar
+^ there are two ways to use it:
+^ 1) handle the changed event (only changed scrollbar is available)
+^ 2) read the value on pressing a button (all scrollbars are available)
+^ x and y position of trackbar
+^ width and height
+^ orientation vertical/horizontal
+^ fieldname data is transfered to lua
+^ value this trackbar is set to (0-1000)
+^ see also minetest.explode_scrollbar_event (main menu: engine.explode_scrollbar_event)
+
table[<X>,<Y>;<W>,<H>;<name>;<cell 1>,<cell 2>,...,<cell n>;<selected idx>]
^ show scrollable table using options defined by the previous tableoptions[]
^ displays cells as defined by the previous tablecolumns[]
@@ -1472,6 +1487,9 @@ minetest.explode_table_event(string) -> table
minetest.explode_textlist_event(string) -> table
^ returns e.g. {type="CHG", index=1}
^ type: "INV" (no row selected), "CHG" (selected) or "DCL" (double-click)
+minetest.explode_scrollbar_event(string) -> table
+^ returns e.g. {type="CHG", value=500}
+^ type: "INV" (something failed), "CHG" (has been changed) or "VAL" (not changed)
Item handling:
minetest.inventorycube(img1, img2, img3)