aboutsummaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2020-05-02 13:12:02 +0200
committerGitHub <noreply@github.com>2020-05-02 13:12:02 +0200
commit5c96f57782d967010f711c3806fdd18caa6e3e32 (patch)
treea7c1a2eeca8d1ecedf1c2dbae4cd132c5f6ea448 /doc/lua_api.txt
parent808eb4c5714da5ac36f4a70653d6b3805060828c (diff)
downloadminetest-5c96f57782d967010f711c3806fdd18caa6e3e32.tar.gz
minetest-5c96f57782d967010f711c3806fdd18caa6e3e32.tar.bz2
minetest-5c96f57782d967010f711c3806fdd18caa6e3e32.zip
Add a convention about z_index (#9701)
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r--doc/lua_api.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 44f62f7a7..988acde89 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1310,7 +1310,21 @@ factor!
The `z_index` field specifies the order of HUD elements from back to front.
Lower z-index elements are displayed behind higher z-index elements. Elements
with same z-index are displayed in an arbitrary order. Default 0.
-Supports negative values.
+Supports negative values. By convention, the following values are recommended:
+
+* -400: Graphical effects, such as vignette
+* -300: Name tags, waypoints
+* -200: Wieldhand
+* -100: Things that block the player's view, e.g. masks
+* 0: Default. For standard in-game HUD elements like crosshair, hotbar,
+ minimap, builtin statbars, etc.
+* 100: Temporary text messages or notification icons
+* 1000: Full-screen effects such as full-black screen or credits.
+ This includes effects that cover the entire screen
+* Other: If your HUD element doesn't fit into any category, pick a number
+ between the suggested values
+
+
Below are the specific uses for fields in each type; fields not listed for that
type are ignored.