1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02: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
12 changed files with 127 additions and 24 deletions

View File

@@ -33,6 +33,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define HUD_CORNER_LOWER 1
#define HUD_CORNER_CENTER 2
#define HUD_STYLE_BOLD 1
#define HUD_STYLE_ITALIC 2
#define HUD_STYLE_MONO 4
// Note that these visibility flags do not determine if the hud items are
// actually drawn, but rather, whether to draw the item should the rest
// of the game state permit it.
@@ -78,6 +82,7 @@ enum HudElementStat {
HUD_STAT_SIZE,
HUD_STAT_Z_INDEX,
HUD_STAT_TEXT2,
HUD_STAT_STYLE,
};
enum HudCompassDir {
@@ -102,6 +107,7 @@ struct HudElement {
v2s32 size;
s16 z_index = 0;
std::string text2;
u32 style;
};
extern const EnumString es_HudElementType[];