From cf7fda00831372d981415f9a830513b2b28fdf25 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Mon, 4 Nov 2019 09:30:02 +0100 Subject: Add z-index management to HUD --- doc/lua_api.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 9ca44747f..697efcdbc 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1260,6 +1260,11 @@ precisely positioned items in the HUD. **Note**: `offset` _will_ adapt to screen DPI as well as user defined scaling 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. + Below are the specific uses for fields in each type; fields not listed for that type are ignored. @@ -7322,6 +7327,9 @@ Used by `Player:hud_add`. Returned by `Player:hud_get`. size = { x=100, y=100 }, -- Size of element in pixels + + z_index = 0, + -- Z index : lower z-index HUDs are displayed behind higher z-index HUDs } Particle definition -- cgit v1.2.3