From cc1f2af41f1aa9214c63b2d38ba824121eee2318 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:52:10 +0300 Subject: CottonInventoryScreen: Fix z order issues --- .../io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main') 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 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(); } } } -- cgit