Fix computer sidebar buttons being invisible
This commit is contained in:
parent
4e42394f33
commit
5b58271b92
|
@ -48,5 +48,6 @@ public void renderBg(GuiGraphics graphics, float partialTicks, int mouseX, int m
|
|||
terminal.getX(), terminal.getY(), terminal.getWidth(), terminal.getHeight(), false
|
||||
);
|
||||
ComputerSidebar.renderBackground(spriteRenderer, computerTextures, leftPos, topPos + sidebarYOffset);
|
||||
graphics.flush(); // Flush to ensure background textures are drawn before foreground.
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,5 +63,6 @@ protected void renderBg(GuiGraphics graphics, float partialTicks, int mouseX, in
|
|||
// Render sidebar
|
||||
var spriteRenderer = SpriteRenderer.createForGui(graphics, RenderTypes.GUI_SPRITES);
|
||||
ComputerSidebar.renderBackground(spriteRenderer, GuiSprites.getComputerTextures(family), leftPos, topPos + sidebarYOffset);
|
||||
graphics.flush(); // Flush to ensure background textures are drawn before foreground.
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,9 +44,8 @@ public DynamicImageButton(
|
|||
@Override
|
||||
public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) {
|
||||
var texture = this.texture.get(isHoveredOrFocused());
|
||||
RenderSystem.setShaderTexture(0, texture.atlasLocation());
|
||||
RenderSystem.disableDepthTest();
|
||||
|
||||
RenderSystem.disableDepthTest();
|
||||
graphics.blit(getX(), getY(), 0, width, height, texture);
|
||||
RenderSystem.enableDepthTest();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue