1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Rename hud_elem_type to type (#14065)

This commit is contained in:
cx384 2023-12-29 21:51:02 +01:00 committed by GitHub
parent bc336480e6
commit 467d3a8c62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 45 additions and 15 deletions

View file

@ -5278,6 +5278,8 @@ Utilities
-- liquid_fluidity, liquid_fluidity_smooth, liquid_sink,
-- acceleration_default, acceleration_air (5.8.0)
physics_overrides_v2 = true,
-- In HUD definitions the field `type` is used and `hud_elem_type` is deprecated (5.9.0)
hud_def_type_field = true,
}
```
@ -7790,7 +7792,7 @@ child will follow movement and rotation of that bone.
* `hud_change(id, stat, value)`: change a value of a previously added HUD
element.
* `stat` supports the same keys as in the hud definition table except for
`"hud_elem_type"`.
`"type"` (or the deprecated `"hud_elem_type"`).
* `hud_get(id)`: gets the HUD element definition structure of the specified ID
* `hud_set_flags(flags)`: sets specified HUD flags of player.
* `flags`: A table with the following fields set to boolean values
@ -10050,9 +10052,14 @@ Used by `ObjectRef:hud_add`. Returned by `ObjectRef:hud_get`.
```lua
{
hud_elem_type = "image",
type = "image",
-- Type of element, can be "image", "text", "statbar", "inventory",
-- "waypoint", "image_waypoint", "compass" or "minimap"
-- If undefined "text" will be used.
hud_elem_type = "image",
-- Deprecated, same as `type`.
-- In case both are specified `type` will be used.
position = {x=0.5, y=0.5},
-- Top left corner position of element