mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Use player:set_hotbar_image() instead of hardcoded hotbar.png
This commit is contained in:
parent
5b518ed2fe
commit
7860097eda
10 changed files with 98 additions and 10 deletions
|
@ -4999,6 +4999,20 @@ bool Server::hudSetHotbarItemcount(Player *player, s32 hotbar_itemcount) {
|
|||
return true;
|
||||
}
|
||||
|
||||
void Server::hudSetHotbarImage(Player *player, std::string name) {
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
SendHUDSetParam(player->peer_id, HUD_PARAM_HOTBAR_IMAGE, name);
|
||||
}
|
||||
|
||||
void Server::hudSetHotbarSelectedImage(Player *player, std::string name) {
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
SendHUDSetParam(player->peer_id, HUD_PARAM_HOTBAR_SELECTED_IMAGE, name);
|
||||
}
|
||||
|
||||
void Server::notifyPlayers(const std::wstring msg)
|
||||
{
|
||||
BroadcastChatMessage(msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue