mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-16 18:01:40 +00:00
Add function to get all HUD elements (#14042)
This commit is contained in:
parent
ed7d4037b2
commit
92c55c27cf
9 changed files with 85 additions and 0 deletions
|
@ -779,6 +779,10 @@ Methods:
|
|||
* See [`HUD definition`](#hud-definition-hud_add-hud_get)
|
||||
* `hud_get(id)`
|
||||
* returns the [`definition`](#hud-definition-hud_add-hud_get) of the HUD with that ID number or `nil`, if non-existent.
|
||||
* `hud_get_all()`:
|
||||
* Returns a table in the form `{ [id] = HUD definition, [id] = ... }`.
|
||||
* A mod should keep track of its introduced IDs and only use this to access foreign elements.
|
||||
* It is discouraged to change foreign HUD elements.
|
||||
* `hud_remove(id)`
|
||||
* remove the HUD element of the specified id, returns `true` on success
|
||||
* `hud_change(id, stat, value)`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue