public abstract class Button extends BaseWidget<Button>
| Constructor and Description |
|---|
Button() |
| Modifier and Type | Method and Description |
|---|---|
Button |
enabled(boolean enabled) |
@NotNull Button |
focusable(boolean focusable)
Sets whether the button is focusable by pressing tab, ignored if not clickable.
|
abstract @Nullable java.util.function.Consumer<Button> |
getOnClick() |
abstract @Nullable java.util.function.BiConsumer<com.mojang.blaze3d.matrix.MatrixStack,Button> |
getOnRender() |
abstract @NotNull net.minecraft.util.text.ITextComponent |
getText() |
abstract int |
getTextColor(me.shedaniel.math.Point mouse) |
abstract int |
getTextureId(me.shedaniel.math.Point mouse) |
abstract java.util.OptionalInt |
getTint() |
abstract @Nullable java.lang.String |
getTooltip() |
abstract boolean |
isEnabled() |
abstract boolean |
isFocusable() |
abstract boolean |
isFocused() |
abstract void |
onClick() |
@NotNull Button |
onClick(@Nullable java.util.function.Consumer<Button> onClick) |
@NotNull Button |
onRender(@Nullable java.util.function.BiConsumer<com.mojang.blaze3d.matrix.MatrixStack,Button> onRender) |
abstract void |
removeTint() |
abstract void |
setEnabled(boolean enabled) |
abstract void |
setFocusable(boolean focusable)
Sets whether the button is focusable by pressing tab, ignored if not clickable.
|
abstract void |
setOnClick(@Nullable java.util.function.Consumer<Button> onClick) |
abstract void |
setOnRender(@Nullable java.util.function.BiConsumer<com.mojang.blaze3d.matrix.MatrixStack,Button> onRender) |
abstract void |
setText(@NotNull net.minecraft.util.text.ITextComponent text) |
abstract void |
setTextColor(@Nullable java.util.function.BiFunction<Button,me.shedaniel.math.Point,java.lang.Integer> textColorFunction) |
abstract void |
setTextureId(@Nullable java.util.function.BiFunction<Button,me.shedaniel.math.Point,java.lang.Integer> textureIdFunction) |
abstract void |
setTint(int tint) |
abstract void |
setTooltip(@Nullable java.util.function.Function<Button,java.lang.String> tooltip)
Sets the tooltip function used to get the tooltip.
|
@NotNull Button |
text(@NotNull net.minecraft.util.text.ITextComponent text) |
Button |
textColor(@Nullable java.util.function.BiFunction<Button,me.shedaniel.math.Point,java.lang.Integer> textColorFunction) |
Button |
textureId(@Nullable java.util.function.BiFunction<Button,me.shedaniel.math.Point,java.lang.Integer> textureIdFunction) |
Button |
tint(@Nullable java.lang.Integer tint) |
@NotNull Button |
tooltipLine(@Nullable java.lang.String tooltip)
Sets the tooltip.
|
@NotNull Button |
tooltipLines(java.lang.String... tooltip)
Sets the tooltip.
|
@NotNull Button |
tooltipSupplier(@Nullable java.util.function.Function<Button,java.lang.String> tooltip)
Sets the tooltip function.
|
containsMouse, containsMousePredicate, setContainsMousePredicategetBoundscontainsMouse, containsMouse, getZ, isMouseOver, setZgetFocused, isDragging, setDragging, setFocusedblit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, innerBlit, setBlitOffset, vLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic abstract void setTextColor(@Nullable
@Nullable java.util.function.BiFunction<Button,me.shedaniel.math.Point,java.lang.Integer> textColorFunction)
public final Button textColor(@Nullable @Nullable java.util.function.BiFunction<Button,me.shedaniel.math.Point,java.lang.Integer> textColorFunction)
public abstract int getTextColor(me.shedaniel.math.Point mouse)
public abstract void setTextureId(@Nullable
@Nullable java.util.function.BiFunction<Button,me.shedaniel.math.Point,java.lang.Integer> textureIdFunction)
public final Button textureId(@Nullable @Nullable java.util.function.BiFunction<Button,me.shedaniel.math.Point,java.lang.Integer> textureIdFunction)
public abstract int getTextureId(me.shedaniel.math.Point mouse)
public abstract void onClick()
public abstract boolean isEnabled()
public abstract void setEnabled(boolean enabled)
public final Button enabled(boolean enabled)
public abstract java.util.OptionalInt getTint()
public abstract void setTint(int tint)
public abstract void removeTint()
public final Button tint(@Nullable @Nullable java.lang.Integer tint)
@NotNull public abstract @NotNull net.minecraft.util.text.ITextComponent getText()
public abstract void setText(@NotNull
@NotNull net.minecraft.util.text.ITextComponent text)
@NotNull public final @NotNull Button text(@NotNull @NotNull net.minecraft.util.text.ITextComponent text)
@Nullable public abstract @Nullable java.util.function.Consumer<Button> getOnClick()
public abstract void setOnClick(@Nullable
@Nullable java.util.function.Consumer<Button> onClick)
@NotNull public final @NotNull Button onClick(@Nullable @Nullable java.util.function.Consumer<Button> onClick)
@Nullable public abstract @Nullable java.util.function.BiConsumer<com.mojang.blaze3d.matrix.MatrixStack,Button> getOnRender()
public abstract void setOnRender(@Nullable
@Nullable java.util.function.BiConsumer<com.mojang.blaze3d.matrix.MatrixStack,Button> onRender)
@NotNull public final @NotNull Button onRender(@Nullable @Nullable java.util.function.BiConsumer<com.mojang.blaze3d.matrix.MatrixStack,Button> onRender)
public abstract boolean isFocusable()
public abstract void setFocusable(boolean focusable)
focusable - whether the button is focusable by pressing tab, ignored if not clickable.@NotNull public final @NotNull Button focusable(boolean focusable)
focusable - whether the label is focusable by pressing tab, ignored if not clickable.@Nullable public abstract @Nullable java.lang.String getTooltip()
public abstract void setTooltip(@Nullable
@Nullable java.util.function.Function<Button,java.lang.String> tooltip)
tooltip - the tooltip function used to get the tooltip.@NotNull public final @NotNull Button tooltipLines(@NotNull java.lang.String... tooltip)
tooltip - the lines of tooltip.@NotNull public final @NotNull Button tooltipLine(@Nullable @Nullable java.lang.String tooltip)
tooltip - the line of tooltip.@NotNull public final @NotNull Button tooltipSupplier(@Nullable @Nullable java.util.function.Function<Button,java.lang.String> tooltip)
tooltip - the tooltip function used to get the tooltip.public abstract boolean isFocused()