1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Add bold, italic and monospace font styling for HUD text elements (#11478)

Co-authored-by: Elias Fleckenstein <eliasfleckenstein@web.de>
This commit is contained in:
sfan5 2021-07-27 19:11:46 +02:00 committed by GitHub
parent cf136914cf
commit 6e8aebf432
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 127 additions and 24 deletions

View file

@ -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;