diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 25 |
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: |