aboutsummaryrefslogtreecommitdiff
path: root/src/hud.h
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/hud.h
parentcf136914cf421ee52f6806eda2fa97740d0ee552 (diff)
downloadhax-minetest-server-6e8aebf4327ed43ade17cbe8e6cf652edc099651.tar.gz
hax-minetest-server-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/hud.h')
-rw-r--r--src/hud.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hud.h b/src/hud.h
index a0613ae98..769966688 100644
--- a/src/hud.h
+++ b/src/hud.h
@@ -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[];