summaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2021-02-17 19:51:28 +0000
committerGitHub <noreply@github.com>2021-02-17 19:51:28 +0000
commitf85e9ab9254e2ae4ac13170f9edea00fb8d931a2 (patch)
tree43fa19520c7f744f798de0ed8bcbb8e01c82e327 /doc/lua_api.txt
parenta8f6befd398cb8f962f3bb1fab092d6355bfe015 (diff)
downloadminetest-f85e9ab9254e2ae4ac13170f9edea00fb8d931a2.tar.gz
minetest-f85e9ab9254e2ae4ac13170f9edea00fb8d931a2.tar.bz2
minetest-f85e9ab9254e2ae4ac13170f9edea00fb8d931a2.zip
Add nametag background setting and object property (#10937)
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt18
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index a09b98924..a9c3bcdd9 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -6274,15 +6274,21 @@ object you are working with still exists.
* `get_nametag_attributes()`
* returns a table with the attributes of the nametag of an object
* {
- color = {a=0..255, r=0..255, g=0..255, b=0..255},
text = "",
+ color = {a=0..255, r=0..255, g=0..255, b=0..255},
+ bgcolor = {a=0..255, r=0..255, g=0..255, b=0..255},
}
* `set_nametag_attributes(attributes)`
* sets the attributes of the nametag of an object
* `attributes`:
{
- color = ColorSpec,
text = "My Nametag",
+ color = ColorSpec,
+ -- ^ Text color
+ bgcolor = ColorSpec or false,
+ -- ^ Sets background color of nametag
+ -- `false` will cause the background to be set automatically based on user settings
+ -- Default: false
}
#### Lua entity only (no-op for other objects)
@@ -6956,9 +6962,13 @@ Player properties need to be saved manually.
-- For all other objects, a nil or empty string removes the nametag.
-- To hide a nametag, set its color alpha to zero. That will disable it entirely.
-
nametag_color = <ColorSpec>,
- -- Sets color of nametag
+ -- Sets text color of nametag
+
+ nametag_bgcolor = <ColorSpec>,
+ -- Sets background color of nametag
+ -- `false` will cause the background to be set automatically based on user settings.
+ -- Default: false
infotext = "",
-- By default empty, text to be shown when pointed at object