summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2014-06-24 12:28:24 +0200
committerRealBadAngel <maciej.kasatkin@o2.pl>2014-06-24 22:11:47 +0200
commit27538ecef51ebcc7622f13956d2f8e101d0f71a7 (patch)
treea343581331dcb346c9a1a7d0a3f4a2463bff0818 /doc
parentd1ee708db2bd41cf46f5cafc54053e54f47fbac9 (diff)
downloadminetest-27538ecef51ebcc7622f13956d2f8e101d0f71a7.tar.gz
minetest-27538ecef51ebcc7622f13956d2f8e101d0f71a7.tar.bz2
minetest-27538ecef51ebcc7622f13956d2f8e101d0f71a7.zip
Tooltips rework.
Separate element for tooltips. Delayed showing, use global color or given ones.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 6ed560869..58c3a133f 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -918,8 +918,14 @@ listcolors[<slot_bg_normal>;<slot_bg_hover>;<slot_border>;<tooltip_bgcolor>;<too
^ Sets background color of slots in HEX-Color format
^ Sets background color of slots on mouse hovering
^ Sets color of slots border
-^ Sets background color of tooltips
-^ Sets font color of tooltips
+^ Sets default background color of tooltips
+^ Sets default font color of tooltips
+
+tooltip[<gui_element_name>;<tooltip_text>;<bgcolor>,<fontcolor>]
+^ Adds tooltip for an element
+^ <bgcolor> tooltip background color in HEX-Color format (optional)
+^ <fontcolor> tooltip font color in HEX-Color format (optional)
+
image[<X>,<Y>;<W>,<H>;<texture name>]
^ Show an image
@@ -986,13 +992,12 @@ vertlabel[<X>,<Y>;<label>]
^ label is the text on the label
^ Position and size units are inventory slots
-button[<X>,<Y>;<W>,<H>;<name>;<label>;<tooltip>]
+button[<X>,<Y>;<W>,<H>;<name>;<label>]
^ Clickable button. When clicked, fields will be sent.
^ x, y and name work as per field
^ w and h are the size of the button
^ label is the text on the button
^ Position and size units are inventory slots
-^ tooltip is optional
image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>]
^ x, y, w, h, and name work as per button
@@ -1000,19 +1005,18 @@ image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>]
^ Position and size units are inventory slots
image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>;<noclip>;<drawborder>;<pressed texture name>]
-image_button[<X>,<Y>;<W>,<H>;<texture name>;<name>;<label>;<noclip>;<drawborder>;<pressed texture name>;<tooltip>]
^ x, y, w, h, and name work as per button
^ texture name is the filename of an image
^ Position and size units are inventory slots
^ noclip true meand imagebutton doesn't need to be within specified formsize
^ drawborder draw button bodrer or not
^ pressed texture name is the filename of an image on pressed state
-^ tooltip is optional
item_image_button[<X>,<Y>;<W>,<H>;<item name>;<name>;<label>]
^ x, y, w, h, name and label work as per button
^ item name is the registered name of an item/node,
tooltip will be made out of its descritption
+ to override it use tooltip element
^ Position and size units are inventory slots
button_exit[<X>,<Y>;<W>,<H>;<name>;<label>]