Custom Button Widget
Deprecated
Custom button widgets now use TextureProvider. Use the primary constructor. Scheduled for removal 0.7.0
A custom ButtonWidget implementation with builder and rendering improvements (and more features in general)
This constructor is for compatibility purposes with subclasses. Use the builder to create buttons.
Author
fzzyhmstrs
Since
0.6.4, scheduled for removal 0.7.0
Parameters
button X position
button Y position
button width in pixels
button height in pixels
Consumer<CustomButtonWidget> action to invoke when the button is clicked or activated
ButtonWidget.NarrationSupplier same use as in vanilla; converts a provided input text into a narration text.
Consumer<NarrationMessageBuilder> unlike the supplier, this is used to directly append additional narrations as needed to the message builder.
TooltipChild, used to pass additional tooltip context. This button will pass and tooltip from this child out to its own parent (this button is also a TooltipChild)
TextureSet, default CustomPressableWidget.DEFAULT_TEXTURES. The textures for this button
If false, the label won't be rendered