diff options
| author | shedaniel <daniel@shedaniel.me> | 2022-01-29 16:11:26 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2022-01-29 18:11:55 +0800 |
| commit | df892092fda8785abf4ad172c2daddc91fee7793 (patch) | |
| tree | 199b3abb9e9c3290a9587cdc85df973157378664 /runtime/src/main/java | |
| parent | 6646ad8092f4790a6891b341ba870d653590519e (diff) | |
| download | RoughlyEnoughItems-df892092fda8785abf4ad172c2daddc91fee7793.tar.gz RoughlyEnoughItems-df892092fda8785abf4ad172c2daddc91fee7793.tar.bz2 RoughlyEnoughItems-df892092fda8785abf4ad172c2daddc91fee7793.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 d467d7801..c67af2ee2 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,18 +574,33 @@ 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<?>) { AbstractContainerScreen<?> containerScreen = (AbstractContainerScreen<?>) Minecraft.getInstance().screen; 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.color4f(1.0F, 1.0F, 1.0F, 1.0F); |
