aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2023-09-27 12:52:10 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2023-09-27 12:52:10 +0300
commitcc1f2af41f1aa9214c63b2d38ba824121eee2318 (patch)
tree7a64b8e90fb497a0437a1d5d146406da739777d3 /src
parent4bc7f4914480e7430b14757cf27bf4b28ec5be04 (diff)
downloadLibGui-cc1f2af41f1aa9214c63b2d38ba824121eee2318.tar.gz
LibGui-cc1f2af41f1aa9214c63b2d38ba824121eee2318.tar.bz2
LibGui-cc1f2af41f1aa9214c63b2d38ba824121eee2318.zip
CottonInventoryScreen: Fix z order issues
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
index 3d807e0..06f7e3f 100644
--- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
+++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java
@@ -281,11 +281,14 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl
if (description!=null) {
WPanel root = description.getRootPanel();
if (root!=null) {
+ context.getMatrices().push();
+ context.getMatrices().translate(0f, 0f, 0.01f);
GL11.glEnable(GL11.GL_SCISSOR_TEST);
Scissors.refreshScissors();
root.paint(context, x, y, mouseX-x, mouseY-y);
GL11.glDisable(GL11.GL_SCISSOR_TEST);
Scissors.checkStackIsEmpty();
+ context.getMatrices().pop();
}
}
}