aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2019-11-22 17:23:51 +0800
committershedaniel <daniel@shedaniel.me>2019-11-22 17:23:51 +0800
commit0710ab56e7e8f76670dab785b907ccfe868ad1d5 (patch)
tree6a8e7a6e3586bc0f679b82d5ec3ba791741cb842 /src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java
parentd15781a946d797a35fb00c248a3e57e2aa3414b5 (diff)
downloadRoughlyEnoughItems-0710ab56e7e8f76670dab785b907ccfe868ad1d5.tar.gz
RoughlyEnoughItems-0710ab56e7e8f76670dab785b907ccfe868ad1d5.tar.bz2
RoughlyEnoughItems-0710ab56e7e8f76670dab785b907ccfe868ad1d5.zip
3.2.9
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/TextFieldWidget.java7
1 files changed, 6 insertions, 1 deletions
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);
}
}