]> git.lizzy.rs Git - mt.git/blobdiff - tocltcmds.go
Support HUD font style
[mt.git] / tocltcmds.go
index 37d7bed084469ea4203f030d0a79bcf3bb7fa349..7c287491593c0fd7ca38120f86672b07eba483d8 100644 (file)
@@ -429,6 +429,7 @@ type HUD struct {
        Size     [2]int32
        ZIndex   int16
        Text2    string
+       Style uint32
 }
 
 type HUDID uint32
@@ -516,6 +517,10 @@ type ToCltChangeHUD struct {
        //mt:if %s.Field == HUDText2
        Text2 string
        //mt:end
+
+       //mt:if %s.Field == HUDStyle
+       Style HUDStyleFlags
+       //mt:end
 }
 
 type HUDField uint8
@@ -534,11 +539,22 @@ const (
        HUDSize
        HUDZIndex
        HUDText2
+       HUDStyle
        hudMax
 )
 
 //go:generate stringer -trimprefix HUD -type HUDField
 
+type HUDStyleFlags uint32
+
+const (
+       StyleBold HUDStyleFlags = 1 << iota
+       StyleItalic
+       StyleMono
+)
+
+//go:generate stringer -trimprefix Style -type HUDStyleFlags
+
 // ToCltHUDFlags tells the client to update its HUD flags.
 type ToCltHUDFlags struct {
        // &^= Mask