summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-07-07 15:53:40 -0400
committerkwolekr <kwolekr@minetest.net>2013-07-07 19:49:52 -0400
commit88d43af276a4ed85500863b427bf370d8eca2095 (patch)
treed02fe1196639c48ad14bc4cfc6c5d621015488bf /doc/lua_api.txt
parent7e73b7cae9faf203e369dc5cf2b85cff6e6efbad (diff)
downloadminetest-88d43af276a4ed85500863b427bf370d8eca2095.tar.gz
minetest-88d43af276a4ed85500863b427bf370d8eca2095.tar.bz2
minetest-88d43af276a4ed85500863b427bf370d8eca2095.zip
Fix many formspec menu bugs
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt25
1 files changed, 23 insertions, 2 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 5a2fdf102..daef00d8b 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -960,11 +960,21 @@ textlist[<X>,<Y>;<W>,<H>;<name>;<listelem 1>,<listelem 2>,...,<listelem n>]
^Scrollabel itemlist showing arbitrary text elements
^ x and y position the itemlist relative to the top left of the menu
^ w and h are the size of the itemlist
-^ listelements can be prepended by #RRGGBB in hexadecimal format
+^ name fieldname sent to server on doubleclick value is current selected element
+^ listelements can be prepended by #colorkey (see colorkeys),
^ if you want a listelement to start with # write ##
+
+textlist[<X>,<Y>;<W>,<H>;<name>;<listelem 1>,<listelem 2>,...,<listelem n>;<selected idx>;<transparent>]
+^Scrollabel itemlist showing arbitrary text elements
+^ x and y position the itemlist relative to the top left of the menu
+^ w and h are the size of the itemlist
^ name fieldname sent to server on doubleclick value is current selected element
+^ listelements can be prepended by #RRGGBB in hexadecimal format
+^ if you want a listelement to start with # write ##
+^ index to be selected within textlist
+^ true/false draw transparent background
-tabheader[<X>,<Y>;<name>;<caption 1>,<caption 2>;<current_tab>;<transparent>;<draw_border>]
+tabheader[<X>,<Y>;<name>;<caption 1>,<caption 2>,...,<caption n>;<current_tab>;<transparent>;<draw_border>]
^ show a tabHEADER at specific position (ignores formsize)
^ x and y position the itemlist relative to the top left of the menu
^ name fieldname data is transfered to lua
@@ -977,8 +987,19 @@ box[<X>,<Y>;<W>,<H>;<color>]
^ simple colored semitransparent box
^ x and y position the box relative to the top left of the menu
^ w and h are the size of box
+^ colorkey (see colorkeys)
+
+dropdown[<X>,<Y>;<W>;<name>;<item 1>,<item 2>, ...,<item n>;<selected idx>]
+^ show a dropdown field
+^ x and y position of dropdown
+^ width of dropdown
+^ fieldname data is transfered to lua
+^ items to be shown in dropdown
+^ index of currently selected dropdown item
^ color in hexadecimal format RRGGBB
+Note: do NOT use a element name starting with "key_" those names are reserved to
+pass key press events to formspec!
Inventory location: