From 457909b6d553a28e6a125d5515257629aededf80 Mon Sep 17 00:00:00 2001 From: LexManos Date: Fri, 12 Jun 2020 16:36:58 -0700 Subject: [PATCH] Remove the yellow coloring on hover in ExtendedButton to match vanilla behavior. Closes #6714 Closes #6713 --- .../fml/client/gui/widget/ExtendedButton.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/net/minecraftforge/fml/client/gui/widget/ExtendedButton.java b/src/main/java/net/minecraftforge/fml/client/gui/widget/ExtendedButton.java index 07edcfde2..312394142 100644 --- a/src/main/java/net/minecraftforge/fml/client/gui/widget/ExtendedButton.java +++ b/src/main/java/net/minecraftforge/fml/client/gui/widget/ExtendedButton.java @@ -20,7 +20,6 @@ package net.minecraftforge.fml.client.gui.widget; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.widget.Widget; import net.minecraft.client.gui.widget.button.Button; import net.minecraftforge.fml.client.gui.GuiUtils; @@ -54,10 +53,6 @@ public class ExtendedButton extends Button int k = this.getYImage(this.isHovered); GuiUtils.drawContinuousTexturedBox(WIDGETS_LOCATION, this.x, this.y, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.getBlitOffset()); this.renderBg(mc, mouseX, mouseY); - int color = getFGColor(); - - if (this.isHovered && this.packedFGColor == Widget.UNSET_FG_COLOR) - color = 0xFFFFA0; // Slightly Yellow String buttonText = this.getMessage(); int strWidth = mc.fontRenderer.getStringWidth(buttonText); @@ -66,7 +61,7 @@ public class ExtendedButton extends Button if (strWidth > width - 6 && strWidth > ellipsisWidth) buttonText = mc.fontRenderer.trimStringToWidth(buttonText, width - 6 - ellipsisWidth).trim() + "..."; - this.drawCenteredString(mc.fontRenderer, buttonText, this.x + this.width / 2, this.y + (this.height - 8) / 2, color); + this.drawCenteredString(mc.fontRenderer, buttonText, this.x + this.width / 2, this.y + (this.height - 8) / 2, getFGColor()); } } }