From 6d5101aad169bc5d4d8bcd638aee0d4ce71c120a Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 7 Jan 2019 13:37:43 +0800 Subject: Fixed tooltip --- src/main/java/me/shedaniel/gui/widget/SmallButton.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java') 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 toolTip = Arrays.asList(toolTipSupplier.apply(isEnabled()).split("\n")); + String ttS = toolTipSupplier.apply(isEnabled()); + if (isHighlighted() && ttS != "") { + List toolTip = Arrays.asList(ttS.split("\n")); if (toolTip != null && toolTip.size() != 0) gui.drawTooltip(toolTip, REIRenderHelper.getMouseLoc().x, REIRenderHelper.getMouseLoc().y); } -- cgit