Package net.uku3lig.ukulib.utils
Class SilentButtonWidget.Builder
java.lang.Object
net.uku3lig.ukulib.utils.SilentButtonWidget.Builder
- Enclosing class:
SilentButtonWidget
A silent button builder
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(net.minecraft.network.chat.Component message, net.minecraft.client.gui.components.Button.OnPress onPress) Creates a builder for a silent button -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the buttondimensions(int x, int y, int width, int height) Sets the dimensionsnarrationSupplier(net.minecraft.client.gui.components.Button.CreateNarration narrationSupplier) Sets the narration supplierposition(int x, int y) Sets the positionsize(int width, int height) Sets the sizetooltip(@Nullable net.minecraft.client.gui.components.Tooltip tooltip) Sets the tooltipwidth(int width) Sets the width
-
Constructor Details
-
Builder
public Builder(net.minecraft.network.chat.Component message, net.minecraft.client.gui.components.Button.OnPress onPress) Creates a builder for a silent button- Parameters:
message- The text of the buttononPress- The action to be done when the button is pressed
-
-
Method Details
-
position
Sets the position- Parameters:
x- The x positiony- The y position- Returns:
- The modified builder
-
width
Sets the width- Parameters:
width- The width- Returns:
- The modified builder
-
size
Sets the size- Parameters:
width- The widthheight- The height- Returns:
- The modified builder
-
dimensions
Sets the dimensions- Parameters:
x- The x positiony- The y positionwidth- The widthheight- The height- Returns:
- The modified builder
-
tooltip
public SilentButtonWidget.Builder tooltip(@Nullable @Nullable net.minecraft.client.gui.components.Tooltip tooltip) Sets the tooltip- Parameters:
tooltip- The tooltip- Returns:
- The modified builder
-
narrationSupplier
public SilentButtonWidget.Builder narrationSupplier(net.minecraft.client.gui.components.Button.CreateNarration narrationSupplier) Sets the narration supplier- Parameters:
narrationSupplier- The narration supplier- Returns:
- The modified builder
-
build
Build the button- Returns:
- The button
-