diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-01-29 16:11:26 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2022-01-29 17:22:14 +0800 |
| commit | 45fbe2c86c3f7fbcae07b067f217c88bb48fe545 (patch) | |
| tree | 73a707ae3e364dd64a0c8c12a9e82c90d9d9d582 /runtime/src/main/java | |
| parent | 0b9c97585c669a8c897f5977c51386167e8b43b9 (diff) | |
| download | RoughlyEnoughItems-45fbe2c86c3f7fbcae07b067f217c88bb48fe545.tar.gz RoughlyEnoughItems-45fbe2c86c3f7fbcae07b067f217c88bb48fe545.tar.bz2 RoughlyEnoughItems-45fbe2c86c3f7fbcae07b067f217c88bb48fe545.zip | |
Fix #697
Diffstat (limited to 'runtime/src/main/java')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/client/gui/ScreenOverlayImpl.java | 23 |
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 4da1c6415..55e6c2910 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 @@ -574,17 +574,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); |
