diff options
author | sfan5 <sfan5@live.de> | 2021-07-27 19:11:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 19:11:46 +0200 |
commit | 6e8aebf4327ed43ade17cbe8e6cf652edc099651 (patch) | |
tree | 4977c6c9f9b0ceb92098694b4f8b990dc4b50822 /src/network/clientpackethandler.cpp | |
parent | cf136914cf421ee52f6806eda2fa97740d0ee552 (diff) | |
download | minetest-6e8aebf4327ed43ade17cbe8e6cf652edc099651.tar.gz minetest-6e8aebf4327ed43ade17cbe8e6cf652edc099651.tar.bz2 minetest-6e8aebf4327ed43ade17cbe8e6cf652edc099651.zip |
Add bold, italic and monospace font styling for HUD text elements (#11478)
Co-authored-by: Elias Fleckenstein <eliasfleckenstein@web.de>
Diffstat (limited to 'src/network/clientpackethandler.cpp')
-rw-r--r-- | src/network/clientpackethandler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index b86bdac18..50f497959 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -1061,6 +1061,7 @@ void Client::handleCommand_HudAdd(NetworkPacket* pkt) v2s32 size; s16 z_index = 0; std::string text2; + u32 style = 0; *pkt >> server_id >> type >> pos >> name >> scale >> text >> number >> item >> dir >> align >> offset; @@ -1069,6 +1070,7 @@ void Client::handleCommand_HudAdd(NetworkPacket* pkt) *pkt >> size; *pkt >> z_index; *pkt >> text2; + *pkt >> style; } catch(PacketError &e) {}; ClientEvent *event = new ClientEvent(); @@ -1089,6 +1091,7 @@ void Client::handleCommand_HudAdd(NetworkPacket* pkt) event->hudadd->size = size; event->hudadd->z_index = z_index; event->hudadd->text2 = text2; + event->hudadd->style = style; m_client_event_queue.push(event); } @@ -1123,7 +1126,7 @@ void Client::handleCommand_HudChange(NetworkPacket* pkt) *pkt >> sdata; else if (stat == HUD_STAT_WORLD_POS) *pkt >> v3fdata; - else if (stat == HUD_STAT_SIZE ) + else if (stat == HUD_STAT_SIZE) *pkt >> v2s32data; else *pkt >> intdata; |