Skip to content

Commit

Permalink
Remove lingering widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
paulyhedral committed Nov 25, 2024
1 parent ecd6a74 commit fefb3b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG/1.18/current.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- `[FIX]` Remove lingering widgets when deleting a recipe from the queue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void renderToolTip(PoseStack pPoseStack, int pMouseX, int pMouseY) {
QueueManagementScreen.this.renderTooltip(poseStack, new TranslatableComponent(Constants.TRANSLATION_KEY_GUI_QUEUEMGR_DEC_BUTTON_TOOLTIP), mouseX, mouseY);
}
}*/;
button.active = pItem.getQuantity() > 0;
button.active = pItem.getQuantity() > 1;
this.addRenderableWidget(button);
}
{
Expand Down Expand Up @@ -148,6 +148,7 @@ public void renderToolTip(PoseStack pPoseStack, int pMouseX, int pMouseY) {
Button button = new Button(topX + width + ITEM_X_DELETE_BUTTON_OFFSET, y + 2, BUTTON_SIZE, BUTTON_SIZE - 2, new TextComponent("x"), btn -> {
CraftingQueueManager.INSTANCE.removeProduct(player, pItem.getItemId());
QueueManagementScreen.this.productItems = CraftingQueueManager.INSTANCE.getEndProducts();
this.renderables.clear();
}) /*{
@Override
public void renderToolTip(PoseStack pPoseStack, int pMouseX, int pMouseY) {
Expand All @@ -165,6 +166,7 @@ public void renderToolTip(PoseStack pPoseStack, int pMouseX, int pMouseY) {
btn -> {
CraftingQueueManager.INSTANCE.removeAll();
QueueManagementScreen.this.productItems = CraftingQueueManager.INSTANCE.getEndProducts();
this.renderables.clear();
}) /*{
@Override
public void renderToolTip(PoseStack pPoseStack, int pMouseX, int pMouseY) {
Expand Down

0 comments on commit fefb3b1

Please sign in to comment.