mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +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
|
@ -139,6 +139,12 @@ HudElement* Player::getHud(u32 id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void Player::hudApply(std::function<void(const std::vector<HudElement*>&)> f)
|
||||
{
|
||||
MutexAutoLock lock(m_mutex);
|
||||
f(hud);
|
||||
}
|
||||
|
||||
HudElement* Player::removeHud(u32 id)
|
||||
{
|
||||
MutexAutoLock lock(m_mutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue