@@ -49,7 +49,7 @@ public class ChatHud extends TextHudEntry {
4949 public static final Identifier ID = new Identifier ("axolotlclient" , "chathud" );
5050 // tooltip: "chathud"
5151 public final BooleanOption background = new BooleanOption ("background" , true );
52- public final ColorOption bgColor = new ColorOption ("bgcolor" , Color .parse ("#40000000 " ));
52+ public final ColorOption bgColor = new ColorOption ("bgcolor" , Color .parse ("#80000000 " ));
5353
5454 public final IntegerOption chatHistory = new IntegerOption ("chatHistoryLength" , 100 , 10 , 5000 );
5555 public final ColorOption scrollbarColor = new ColorOption ("scrollbarColor" , Color .parse ("#70CCCCCC" ));
@@ -128,18 +128,18 @@ public void render(float delta) {
128128 if (opacity > 3 ) {
129129 int y = pos .y + getHeight () - (m * (9 + lineSpacing .get ()));
130130 if (background .get ()) {
131- int bg = bgColor .get (). toInt ();
131+ Color bg = bgColor .get ();
132132 if (!isChatFocused ()) {
133- bg += ((int )(( bg >> 24 ) * d )) << 24 ;
133+ bg = bg . withAlpha ((int ) ( bg . getAlpha ()* d ));
134134 }
135135 fill (pos .x , y - (9 + lineSpacing .get ()), pos .x + l + 4 , y ,
136- bg );
136+ bg . toInt () );
137137 }
138138 String string = chatHudLine .getText ().getFormattedString ();
139139 GlStateManager .enableBlend ();
140- int text = textColor .get (). toInt ();
140+ Color text = textColor .get ();
141141 if (!isChatFocused ()) {
142- text += ((int )(( text >> 24 ) * d )) << 24 ;
142+ text = text . withAlpha ((int ) ( text . getAlpha ()* d ));
143143 }
144144 DrawUtil .drawString (string , pos .x , (y - 8 ),
145145 text , shadow .get ());
0 commit comments