From fc7032fa4d7f8d6aec59d38fb5a6d7002ef400b1 Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Fri, 8 Mar 2024 00:21:39 +0100 Subject: [PATCH] Switch over from SmallerButton to vanilla's button --- .../actuallyadditions/mod/inventory/gui/CrusherScreen.java | 3 ++- .../actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java index 2967d1ac6..7c6d828f8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java @@ -52,7 +52,8 @@ public class CrusherScreen extends AAScreen { : 42), this.topPos + 5, this.tileGrinder.storage); if (this.isDouble) { - this.buttonAutoSplit = new Buttons.SmallerButton( this.leftPos - 10, this.topPos, Component.literal("S"), (button) -> actionPerformed(0)); + this.buttonAutoSplit = Button.builder(Component.literal("S"), (button) -> actionPerformed(0)) + .bounds(this.leftPos - 10, this.topPos, 16, 16).build(); this.addRenderableWidget(this.buttonAutoSplit); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java index 5204fd855..d7462c051 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java @@ -60,7 +60,8 @@ public class GuiFurnaceDouble extends AAScreen { public void init() { super.init(); this.energy = new EnergyDisplay(this.leftPos + 27, this.topPos + 5, this.tileFurnace.storage); - this.buttonAutoSplit = new Buttons.SmallerButton(this.leftPos, this.topPos, Component.literal("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0)); + this.buttonAutoSplit = Button.builder(Component.literal("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0)) + .bounds(this.leftPos + 27, this.topPos + 5, 16, 16).build(); buttonAutoSplit.setFGColor(this.tileFurnace.isAutoSplit ? ChatFormatting.DARK_GREEN.getColor() : ChatFormatting.RED.getColor()); this.addRenderableWidget(this.buttonAutoSplit); }