@@ -72,37 +72,36 @@ public static void draw(MatrixStack matrixStack)
7272 matrixStack .scale ((float ) BlockifyConfig .scale , (float ) BlockifyConfig .scale ,1 );
7373 scaledWidth = client .getWindow ().getScaledWidth ();
7474 scaledHeight = client .getWindow ().getScaledHeight ();
75-
76- drawRectangle (0 , 0 , 185 , 55 , new Color (MidnightColorUtil .hex2Rgb (BlockifyConfig .backgroundColor ).getRed (), MidnightColorUtil .hex2Rgb (BlockifyConfig .backgroundColor ).getGreen (), MidnightColorUtil .hex2Rgb (BlockifyConfig .backgroundColor ).getBlue (), BlockifyConfig .backgroundTransparency )); // background
77- drawRectangle (60 , 48 , 180 , 50 , MidnightColorUtil .hex2Rgb (BlockifyConfig .barColor ).darker ().darker ()); // progressbar
78- drawRectangle (60 , 48 , (float ) (60 + (120 * percentProgress )), 50 , MidnightColorUtil .hex2Rgb (BlockifyConfig .barColor )); // progressbar
79-
80- if (hudInfo [4 ] != null && (!prevImage .equals (hudInfo [4 ]) && !hudInfo [4 ].equals ("" )))
75+ int textOffset = 55 ;
76+ if ((BlockifyConfig .drawCover != false ) && hudInfo [4 ] != null && (!prevImage .equals (hudInfo [4 ]) && !hudInfo [4 ].equals ("" )))
8177 {
8278 LOGGER .info ("Drawing new album cover." );
8379 albumImage .setImage (hudInfo [4 ]);
8480 prevImage = hudInfo [4 ];
8581 }
8682
87-
88- drawRectangle (5 , 5 , 50 , 50 , new Color (0 ,0 ,0 ,150 ));
89- if (hudInfo [4 ] != null )
83+ if (hudInfo [4 ] != null && (BlockifyConfig .drawCover != false ))
9084 {
85+ drawRectangle (5 , 5 , 50 , 50 , new Color (0 ,0 ,0 ,150 ));
9186 RenderUtil .drawTexture (matrixStack , albumImage , 5 , 5 , .15F );
87+ textOffset = 0 ;
9288 }
9389
90+ drawRectangle (0 , 0 , 185 - textOffset , 55 , new Color (MidnightColorUtil .hex2Rgb (BlockifyConfig .backgroundColor ).getRed (), MidnightColorUtil .hex2Rgb (BlockifyConfig .backgroundColor ).getGreen (), MidnightColorUtil .hex2Rgb (BlockifyConfig .backgroundColor ).getBlue (), BlockifyConfig .backgroundTransparency ));
91+ drawRectangle (60 - textOffset , 48 , 180 - textOffset , 50 , MidnightColorUtil .hex2Rgb (BlockifyConfig .barColor ).darker ().darker ());
92+ drawRectangle (60 - textOffset , 48 , (float ) (60 + (120 * percentProgress )) - textOffset , 50 , MidnightColorUtil .hex2Rgb (BlockifyConfig .barColor ));
9493
9594 List <OrderedText > nameWrap = fontRenderer .wrapLines (StringVisitable .plain (hudInfo [0 ]), 125 );
9695 int yOffset = 0 ;
9796 if (nameWrap .size () > 1 )
9897 {
99- fontRenderer .drawWithShadow (matrixStack , nameWrap .get (0 ), 60 , 5 , MidnightColorUtil .hex2Rgb (BlockifyConfig .titleColor ).getRGB ());
100- fontRenderer .drawWithShadow (matrixStack , nameWrap .get (1 ), 60 , 18 , MidnightColorUtil .hex2Rgb (BlockifyConfig .titleColor ).getRGB ());
98+ fontRenderer .drawWithShadow (matrixStack , nameWrap .get (0 ), 60 - textOffset , 5 , MidnightColorUtil .hex2Rgb (BlockifyConfig .titleColor ).getRGB ());
99+ fontRenderer .drawWithShadow (matrixStack , nameWrap .get (1 ), 60 - textOffset , 18 , MidnightColorUtil .hex2Rgb (BlockifyConfig .titleColor ).getRGB ());
101100 yOffset = 15 ;
102101 }
103102 else
104103 {
105- fontRenderer .drawWithShadow (matrixStack , nameWrap .get (0 ), 60 , 5 , MidnightColorUtil .hex2Rgb (BlockifyConfig .titleColor ).getRGB ());
104+ fontRenderer .drawWithShadow (matrixStack , nameWrap .get (0 ), 60 - textOffset , 5 , MidnightColorUtil .hex2Rgb (BlockifyConfig .titleColor ).getRGB ());
106105 yOffset = 0 ;
107106 }
108107 matrixStack .scale (.5F , .5F , .5F );
@@ -113,20 +112,20 @@ public static void draw(MatrixStack matrixStack)
113112 int artistYOffset = 0 ;
114113 if (artistWrap .size () > 1 )
115114 {
116- fontRenderer .drawWithShadow (matrixStack , artistWrap .get (0 ), 120 , 44 + yOffset , MidnightColorUtil .hex2Rgb (BlockifyConfig .artistColor ).getRGB ());
117- fontRenderer .drawWithShadow (matrixStack , artistWrap .get (1 ), 120 , 57 + yOffset , MidnightColorUtil .hex2Rgb (BlockifyConfig .artistColor ).getRGB ());
115+ fontRenderer .drawWithShadow (matrixStack , artistWrap .get (0 ), 120 - ( textOffset * 2 ) , 44 + yOffset , MidnightColorUtil .hex2Rgb (BlockifyConfig .artistColor ).getRGB ());
116+ fontRenderer .drawWithShadow (matrixStack , artistWrap .get (1 ), 120 - ( textOffset * 2 ) , 57 + yOffset , MidnightColorUtil .hex2Rgb (BlockifyConfig .artistColor ).getRGB ());
118117 artistYOffset = 15 ;
119118 }
120119 else
121120 {
122- fontRenderer .drawWithShadow (matrixStack , artistWrap .get (0 ), 120 , 44 + yOffset , MidnightColorUtil .hex2Rgb (BlockifyConfig .artistColor ).getRGB ());
121+ fontRenderer .drawWithShadow (matrixStack , artistWrap .get (0 ), 120 - ( textOffset * 2 ) , 44 + yOffset , MidnightColorUtil .hex2Rgb (BlockifyConfig .artistColor ).getRGB ());
123122 artistYOffset = 0 ;
124123 }
125124 String progressText = (progressMS / (1000 * 60 )) + ":" + String .format ("%02d" , (progressMS / 1000 % 60 ));
126125 String durationText = (durationMS / (1000 * 60 )) + ":" + String .format ("%02d " , (durationMS / 1000 % 60 )) + I18n .translate ("blockify.hud.volume" ) + ": " + hudInfo [6 ];
127126
128- fontRenderer .drawWithShadow (matrixStack , progressText , 120 , 85 , MidnightColorUtil .hex2Rgb (BlockifyConfig .timeColor ).getRGB ());
129- fontRenderer .drawWithShadow (matrixStack , durationText , 360 - (fontRenderer .getWidth (durationText )), 85 , MidnightColorUtil .hex2Rgb (BlockifyConfig .timeColor ).getRGB ());
127+ fontRenderer .drawWithShadow (matrixStack , progressText , 120 - ( textOffset * 2 ) , 85 , MidnightColorUtil .hex2Rgb (BlockifyConfig .timeColor ).getRGB ());
128+ fontRenderer .drawWithShadow (matrixStack , durationText , 360 - (fontRenderer .getWidth (durationText )) - ( textOffset * 2 ) , 85 , MidnightColorUtil .hex2Rgb (BlockifyConfig .timeColor ).getRGB ());
130129 matrixStack .scale (2F , 2F , 2F );
131130 matrixStack .scale (1 ,1 ,1 );
132131 matrixStack .pop ();
0 commit comments