1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-16 18:01:40 +00:00

Add z-index management to HUD

This commit is contained in:
Pierre-Yves Rollo 2019-11-04 09:30:02 +01:00 committed by rubenwardy
parent f6de86ce4b
commit cf7fda0083
10 changed files with 57 additions and 7 deletions

View file

@ -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