Luanti 5.17.0-dev
Loading...
Searching...
No Matches
PlayerHud Struct Reference

#include <player.h>

Collaboration diagram for PlayerHud:

Public Member Functions

const auto & getElements () const
HudElementget (u32 id)
 Returns nullptr if not found.
u32 add (std::unique_ptr< HudElement > e)
 Returns the ID of the added element.
bool remove (u32 id)
 Returns whether removal succeeded.
void clear ()

Private Member Functions

u32 getFreeID ()

Private Attributes

std::vector< std::unique_ptr< HudElement > > m_elements

Member Function Documentation

◆ add()

u32 PlayerHud::add ( std::unique_ptr< HudElement > e)

Returns the ID of the added element.

References getFreeID(), and m_elements.

Referenced by Game::handleClientEvent_HudAdd(), Server::hudAdd(), and LuaLocalPlayer::l_hud_add().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void PlayerHud::clear ( )

References m_elements.

Referenced by Server::StageTwoClientInit().

Here is the caller graph for this function:

◆ get()

HudElement * PlayerHud::get ( u32 id)

Returns nullptr if not found.

References m_elements.

Referenced by Game::handleClientEvent_HudChange(), Server::hudAdd(), LuaLocalPlayer::l_hud_change(), ObjectRef::l_hud_change(), LuaLocalPlayer::l_hud_get(), and ObjectRef::l_hud_get().

Here is the caller graph for this function:

◆ getElements()

const auto & PlayerHud::getElements ( ) const
inline

References m_elements.

Referenced by LuaLocalPlayer::l_hud_get_all(), and ObjectRef::l_hud_get_all().

Here is the caller graph for this function:

◆ getFreeID()

u32 PlayerHud::getFreeID ( )
private

References m_elements.

Referenced by add().

Here is the caller graph for this function:

◆ remove()

bool PlayerHud::remove ( u32 id)

Returns whether removal succeeded.

References m_elements.

Referenced by Game::handleClientEvent_HudRemove(), Server::hudRemove(), and LuaLocalPlayer::l_hud_remove().

Here is the caller graph for this function:

Member Data Documentation

◆ m_elements

std::vector<std::unique_ptr<HudElement> > PlayerHud::m_elements
private

The documentation for this struct was generated from the following files: