瀏覽代碼

Fixed tooltip

Unknown 6 年之前
父節點
當前提交
eea47c59b5
共有 2 個文件被更改,包括 4 次插入3 次删除
  1. 1 1
      build.gradle
  2. 3 2
      src/main/java/me/shedaniel/gui/widget/SmallButton.java

+ 1 - 1
build.gradle

@@ -6,7 +6,7 @@ sourceCompatibility = 1.8
 targetCompatibility = 1.8
 
 archivesBaseName = "RoughlyEnoughItems"
-version = "1.5-15"
+version = "1.5-16"
 
 minecraft {
 }

+ 3 - 2
src/main/java/me/shedaniel/gui/widget/SmallButton.java

@@ -62,8 +62,9 @@ public class SmallButton extends Control {
         gui.drawStringCentered(lvt_5_1_, this.buttonText, rect.x + rect.width / 2, rect.y + (rect.height - 8) / 2, lvt_7_1_);
         GlStateManager.enableLighting();
         GlStateManager.popMatrix();
-        if (isHighlighted()) {
-            List<String> toolTip = Arrays.asList(toolTipSupplier.apply(isEnabled()).split("\n"));
+        String ttS = toolTipSupplier.apply(isEnabled());
+        if (isHighlighted() && ttS != "") {
+            List<String> toolTip = Arrays.asList(ttS.split("\n"));
             if (toolTip != null && toolTip.size() != 0)
                 gui.drawTooltip(toolTip, REIRenderHelper.getMouseLoc().x, REIRenderHelper.getMouseLoc().y);
         }