aboutsummaryrefslogtreecommitdiff
path: root/runtime/src/main/java/me
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2022-01-29 16:11:26 +0800
committershedaniel <daniel@shedaniel.me>2022-01-29 16:11:26 +0800
commita4d1b4abdb8d20109590c7eb4de803b230ff10e8 (patch)
tree9412a2c919783294268dbb068ff53d310228363e /runtime/src/main/java/me
parent7410e5d8f9e4df5777f80b5b7c040c60509c2164 (diff)
downloadRoughlyEnoughItems-a4d1b4abdb8d20109590c7eb4de803b230ff10e8.tar.gz
RoughlyEnoughItems-a4d1b4abdb8d20109590c7eb4de803b230ff10e8.tar.bz2
RoughlyEnoughItems-a4d1b4abdb8d20109590c7eb4de803b230ff10e8.zip
Fix #697
Diffstat (limited to 'runtime/src/main/java/me')
-rw-r--r--runtime/src/main/java/me/shedaniel/rei/impl/client/gui/ScreenOverlayImpl.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/ScreenOverlayImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/ScreenOverlayImpl.java
index ade7f3489..d40f3c1e1 100644
--- a/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/ScreenOverlayImpl.java
+++ b/runtime/src/main/java/me/shedaniel/rei/impl/client/gui/ScreenOverlayImpl.java
@@ -585,17 +585,32 @@ public class ScreenOverlayImpl extends ScreenOverlay {
ENTRY_LIST_WIDGET.updateSearch(REIRuntimeImpl.getSearchField().getText(), true);
}
if (OverlaySearchField.isHighlighting) {
- matrices.pushPose();
- matrices.translate(0, 0, 200f);
+ RenderSystem.disableDepthTest();
+ RenderSystem.colorMask(true, true, true, false);
if (Minecraft.getInstance().screen instanceof AbstractContainerScreen<?> containerScreen) {
int x = containerScreen.leftPos, y = containerScreen.topPos;
for (Slot slot : containerScreen.getMenu().slots) {
if (!slot.hasItem() || !ENTRY_LIST_WIDGET.matches(EntryStacks.of(slot.getItem()))) {
- fillGradient(matrices, x + slot.x, y + slot.y, x + slot.x + 16, y + slot.y + 16, -601874400, -601874400);
+ matrices.pushPose();
+ matrices.translate(0, 0, 500f);
+ fillGradient(matrices, x + slot.x, y + slot.y, x + slot.x + 16, y + slot.y + 16, 0xdc202020, 0xdc202020);
+ matrices.popPose();
+ } else {
+ matrices.pushPose();
+ matrices.translate(0, 0, 200f);
+ fillGradient(matrices, x + slot.x, y + slot.y, x + slot.x + 16, y + slot.y + 16, 0x345fff3b, 0x345fff3b);
+
+ fillGradient(matrices, x + slot.x - 1, y + slot.y - 1, x + slot.x, y + slot.y + 16 + 1, 0xff5fff3b, 0xff5fff3b);
+ fillGradient(matrices, x + slot.x + 16, y + slot.y - 1, x + slot.x + 16 + 1, y + slot.y + 16 + 1, 0xff5fff3b, 0xff5fff3b);
+ fillGradient(matrices, x + slot.x - 1, y + slot.y - 1, x + slot.x + 16, y + slot.y, 0xff5fff3b, 0xff5fff3b);
+ fillGradient(matrices, x + slot.x - 1, y + slot.y + 16, x + slot.x + 16, y + slot.y + 16 + 1, 0xff5fff3b, 0xff5fff3b);
+
+ matrices.popPose();
}
}
}
- matrices.popPose();
+ RenderSystem.colorMask(true, true, true, true);
+ RenderSystem.enableDepthTest();
}
if (!hasSpace()) return;
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);