aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-01-07 13:37:43 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-01-07 13:37:43 +0800
commit6d5101aad169bc5d4d8bcd638aee0d4ce71c120a (patch)
tree3bb3b038c908cb8352fad2e8d4535ef3128c8fab
parentea9421a3b7c7eec1fbe829ebe749acccdb4ef495 (diff)
downloadRoughlyEnoughItems-6d5101aad169bc5d4d8bcd638aee0d4ce71c120a.tar.gz
RoughlyEnoughItems-6d5101aad169bc5d4d8bcd638aee0d4ce71c120a.tar.bz2
RoughlyEnoughItems-6d5101aad169bc5d4d8bcd638aee0d4ce71c120a.zip
Fixed tooltip
-rwxr-xr-xbuild.gradle2
-rw-r--r--src/main/java/me/shedaniel/gui/widget/SmallButton.java5
2 files changed, 4 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle
index 832c7e053..efba9fa53 100755
--- a/build.gradle
+++ b/build.gradle
@@ -6,7 +6,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8
archivesBaseName = "RoughlyEnoughItems"
-version = "1.5-15"
+version = "1.5-16"
minecraft {
}
diff --git a/src/main/java/me/shedaniel/gui/widget/SmallButton.java b/src/main/java/me/shedaniel/gui/widget/SmallButton.java
index 2e6a7ad1b..afdbaf5d9 100644
--- a/src/main/java/me/shedaniel/gui/widget/SmallButton.java
+++ b/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);
}