mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-23 15:36:54 +00:00
Fix computer sidebar buttons being invisible
This commit is contained in:
parent
4e42394f33
commit
5b58271b92
@ -48,5 +48,6 @@ public final class ComputerScreen<T extends AbstractComputerMenu> extends Abstra
|
||||
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 @@ public class TurtleScreen extends AbstractComputerScreen<TurtleMenu> {
|
||||
// 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 class DynamicImageButton extends Button {
|
||||
@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
Block a user