@@ -370,7 +370,10 @@ protected void mouseClicked(int mouseX, int mouseY, int button) throws IOExcepti
370370 // Version check button
371371 if (this .selectedModData != null ) {
372372 int contentLeft = this .modList .right + 12 + 10 ;
373- String version = I18n .format ("catalogue.gui.version" , this .selectedModData .getVersion ());
373+ String displayVersion = this .selectedModData .getVersion ();
374+ String innerVersion = this .selectedModData .getInnerVersion ();
375+ boolean useInnerAsMain = displayVersion .isBlank () && !innerVersion .isBlank ();
376+ String version = I18n .format (useInnerAsMain ? "catalogue.gui.inner_version" : "catalogue.gui.version" , useInnerAsMain ? innerVersion : displayVersion );
374377 int versionWidth = this .fontRenderer .getStringWidth (version );
375378 if (ClientHelper .isMouseWithin (contentLeft + versionWidth + 5 , 92 , 8 , 8 , mouseX , mouseY )) {
376379 IModData .Update update = this .selectedModData .getUpdate ();
@@ -924,7 +927,10 @@ private void drawModInfo(int mouseX, int mouseY, float partialTicks) {
924927 String displayVersion = this .selectedModData .getVersion ();
925928 String innerVersion = this .selectedModData .getInnerVersion ();
926929 boolean useInnerAsMain = displayVersion .isBlank () && !innerVersion .isBlank ();
927- int versionWidth = this .drawStringWithLabel (useInnerAsMain ? "catalogue.gui.inner_version" : "catalogue.gui.version" , useInnerAsMain ? innerVersion : displayVersion , contentLeft , 92 , contentWidth , mouseX , mouseY , TextFormatting .GRAY , TextFormatting .WHITE );
930+ String drawKey = useInnerAsMain ? "catalogue.gui.inner_version" : "catalogue.gui.version" ;
931+ String drawVersion = useInnerAsMain ? innerVersion : displayVersion ;
932+ this .drawStringWithLabel (drawKey , drawVersion , contentLeft , 92 , contentWidth , mouseX , mouseY , TextFormatting .GRAY , TextFormatting .WHITE );
933+ int versionWidth = this .fontRenderer .getStringWidth (I18n .format (drawKey , drawVersion ));
928934
929935 // Draw inner version tool tip if the display version is different from it
930936 if (!useInnerAsMain && !displayVersion .equals (innerVersion ) && !innerVersion .isBlank () && ClientHelper .isMouseWithin (contentLeft , 92 , versionWidth , this .fontRenderer .FONT_HEIGHT , mouseX , mouseY )) {
@@ -1070,7 +1076,7 @@ public void drawEntry(int index, int left, int top, int rowWidth, int rowHeight,
10701076 * @param mouseY the current mouse y position
10711077 */
10721078 @ SuppressWarnings ("SameParameterValue" )
1073- private int drawStringWithLabel (String format , String text , int x , int y , int maxWidth , int mouseX , int mouseY , TextFormatting labelColor , TextFormatting contentColor ) {
1079+ private void drawStringWithLabel (String format , String text , int x , int y , int maxWidth , int mouseX , int mouseY , TextFormatting labelColor , TextFormatting contentColor ) {
10741080 String formatted = labelColor + I18n .format (format , contentColor + text );
10751081 if (this .fontRenderer .getStringWidth (formatted ) > maxWidth ) {
10761082 formatted = this .fontRenderer .trimStringToWidth (formatted , maxWidth - 7 ) + "..." ;
@@ -1079,7 +1085,7 @@ private int drawStringWithLabel(String format, String text, int x, int y, int ma
10791085 this .setActiveTooltip (text );
10801086 }
10811087 }
1082- return this .fontRenderer . drawStringWithShadow ( formatted , x , y , 0xFFFFFF );
1088+ drawString ( this .fontRenderer , formatted , x , y , 0xFFFFFF );
10831089 }
10841090
10851091 private ImageInfo getBanner (String modId ) {
0 commit comments