From 6e8aebf4327ed43ade17cbe8e6cf652edc099651 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 27 Jul 2021 19:11:46 +0200 Subject: Add bold, italic and monospace font styling for HUD text elements (#11478) Co-authored-by: Elias Fleckenstein --- src/network/clientpackethandler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/network/clientpackethandler.cpp') 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; -- cgit v1.2.3