From 0710ab56e7e8f76670dab785b907ccfe868ad1d5 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Fri, 22 Nov 2019 17:23:51 +0800 Subject: 3.2.9 --- src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java') diff --git a/src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java index b823a6030..fe07f23c6 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java @@ -9,6 +9,8 @@ import com.google.common.base.Predicates; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; import me.shedaniel.math.api.Rectangle; +import me.shedaniel.math.impl.PointHelper; +import me.shedaniel.rei.impl.ScreenHelper; import net.minecraft.SharedConstants; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.render.BufferBuilder; @@ -387,7 +389,10 @@ public class TextFieldWidget extends WidgetWithBounds implements Tickable { public void renderBorder() { if (this.hasBorder()) { - fill(this.bounds.x - 1, this.bounds.y - 1, this.bounds.x + this.bounds.width + 1, this.bounds.y + this.bounds.height + 1, -6250336); + if (containsMouse(PointHelper.fromMouse()) || focused) + fill(this.bounds.x - 1, this.bounds.y - 1, this.bounds.x + this.bounds.width + 1, this.bounds.y + this.bounds.height + 1, ScreenHelper.isDarkModeEnabled() ? 0xffffbb4d : -1); + else + fill(this.bounds.x - 1, this.bounds.y - 1, this.bounds.x + this.bounds.width + 1, this.bounds.y + this.bounds.height + 1, -6250336); fill(this.bounds.x, this.bounds.y, this.bounds.x + this.bounds.width, this.bounds.y + this.bounds.height, -16777216); } } -- cgit