1
0
Fork 0
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:
cx384 2024-01-14 17:46:29 +01:00 committed by GitHub
parent ed7d4037b2
commit 92c55c27cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);