aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-07-27 19:11:46 +0200
committerGitHub <noreply@github.com>2021-07-27 19:11:46 +0200
commit6e8aebf4327ed43ade17cbe8e6cf652edc099651 (patch)
tree4977c6c9f9b0ceb92098694b4f8b990dc4b50822 /src/network
parentcf136914cf421ee52f6806eda2fa97740d0ee552 (diff)
downloadminetest-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')
-rw-r--r--src/network/clientpackethandler.cpp5
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;