Skip to content

Commit

Permalink
Call updateTitle on button clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Aug 21, 2024
1 parent 4a0e323 commit d353ba3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public ToggleableButton(Panel panel, boolean defaultState, Icon enabled, Icon di
this.setConsumer((widget, button) -> {
this.state = !this.state;
widget.setIcon(this.state ? enabled : disabled);
updateTitle();
toggleableCallback.onClicked(widget, this.state);
});
this.enabledText = Component.translatable("ftblibrary.gui.enabled").withStyle(ChatFormatting.GREEN);
Expand Down

0 comments on commit d353ba3

Please sign in to comment.