1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 00:55:20 +02:00

Add function to get all HUD elements (#14042)

This commit is contained in:
cx384
2024-01-14 17:46:29 +01:00
committed by GitHub
parent ed7d4037b2
commit 92c55c27cf
9 changed files with 85 additions and 0 deletions

View File

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