From 6e073682dfa262b984e24627dd9ce6283923a56c Mon Sep 17 00:00:00 2001 From: Sollace Date: Tue, 24 Sep 2024 15:16:18 +0100 Subject: [PATCH] Fix layering on the tribe confirmation screen --- .../client/gui/TribeConfirmationScreen.java | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/client/gui/TribeConfirmationScreen.java b/src/main/java/com/minelittlepony/unicopia/client/gui/TribeConfirmationScreen.java index 50967105..93113e41 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/gui/TribeConfirmationScreen.java +++ b/src/main/java/com/minelittlepony/unicopia/client/gui/TribeConfirmationScreen.java @@ -103,13 +103,16 @@ public class TribeConfirmationScreen extends GameGui implements HidesHud { } @Override - public void render(DrawContext context, int mouseX, int mouseY, float delta) { + public void renderBackground(DrawContext context, int mouseX, int mouseY, float delta) { + context.getMatrices().push(); + context.getMatrices().translate(0, 0, -2); if (parent != null) { context.getMatrices().push(); context.getMatrices().translate(0, 0, -100); - parent.render(context, 0, 0, delta); + parent.render(context, -1, -1, delta); context.getMatrices().pop(); } + renderInGameBackground(context); final int columnHeight = 180; final int columnWidth = 310; @@ -119,30 +122,19 @@ public class TribeConfirmationScreen extends GameGui implements HidesHud { int left = (width - columnWidth) / 2; top += 40; - final int zOffset = 0; context.drawTexture(TribeSelectionScreen.TEXTURE, left + zOffset, top, 0, 70, 123, columnHeight); - context.drawTexture(TribeSelectionScreen.TEXTURE, left + segmentWidth + zOffset, top, 20, 70, 123, columnHeight); - - context.drawTexture(TribeSelectionScreen.TEXTURE, width - left - segmentWidth + zOffset, top, 10, 70, 123, columnHeight); - + context.drawTexture(TribeSelectionScreen.TEXTURE, width - left - segmentWidth + zOffset + 1, top, 10, 70, 123, columnHeight); top -= 31; - left = width / 2; - context.drawTexture(TribeSelectionScreen.TEXTURE, left - 55, top, 140, 70, 21, 50); context.drawTexture(TribeSelectionScreen.TEXTURE, left + 35, top, 148, 70, 21, 50); - textBody.render(context, mouseX, mouseY, delta); - - context.getMatrices().push(); - context.getMatrices().translate(0, 0, 2); + context.getMatrices().pop(); context.drawTexture(TribeSelectionScreen.TEXTURE, left - 35, top - 5, 10, 70, 69, 50); context.drawTexture(TribeSelectionScreen.TEXTURE, left - 35, top - 15, 10, 70, 69, 50); - super.render(context, mouseX, mouseY, delta); - context.getMatrices().pop(); } @Override