1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +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

@ -1638,7 +1638,7 @@ void Server::SendHUDAdd(session_t peer_id, u32 id, HudElement *form)
pkt << id << (u8) form->type << form->pos << form->name << form->scale
<< form->text << form->number << form->item << form->dir
<< form->align << form->offset << form->world_pos << form->size
<< form->z_index << form->text2;
<< form->z_index << form->text2 << form->style;
Send(&pkt);
}
@ -1673,10 +1673,7 @@ void Server::SendHUDChange(session_t peer_id, u32 id, HudElementStat stat, void
case HUD_STAT_SIZE:
pkt << *(v2s32 *) value;
break;
case HUD_STAT_NUMBER:
case HUD_STAT_ITEM:
case HUD_STAT_DIR:
default:
default: // all other types
pkt << *(u32 *) value;
break;
}