Package net.uku3lig.ukulib.utils
Class SilentButtonWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.ClickableWidget
net.minecraft.client.gui.widget.PressableWidget
net.minecraft.client.gui.widget.ButtonWidget
net.uku3lig.ukulib.utils.SilentButtonWidget
- All Implemented Interfaces:
net.minecraft.client.gui.Drawable,net.minecraft.client.gui.Element
public class SilentButtonWidget
extends net.minecraft.client.gui.widget.ButtonWidget
A button that doesn't make noise.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.widget.ButtonWidget
net.minecraft.client.gui.widget.ButtonWidget.PressAction, net.minecraft.client.gui.widget.ButtonWidget.TooltipSupplier -
Field Summary
Fields inherited from class net.minecraft.client.gui.widget.ButtonWidget
EMPTY, onPress, tooltipSupplierFields inherited from class net.minecraft.client.gui.widget.ClickableWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_TEXTURE, width, x, yFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
ConstructorsModifierConstructorDescriptionSilentButtonWidget(int x, int y, int width, int height, net.minecraft.text.Text message, net.minecraft.client.gui.widget.ButtonWidget.PressAction onPress) Creates a new silent buttonprotectedSilentButtonWidget(int x, int y, int width, int height, net.minecraft.text.Text message, net.minecraft.client.gui.widget.ButtonWidget.PressAction onPress, net.minecraft.client.gui.widget.ButtonWidget.TooltipSupplier tooltipSupplier) Creates a new silent button -
Method Summary
Modifier and TypeMethodDescriptionvoidplayDownSound(net.minecraft.client.sound.SoundManager soundManager) Methods inherited from class net.minecraft.client.gui.widget.ButtonWidget
onPress, renderButton, renderToolTipMethods inherited from class net.minecraft.client.gui.widget.PressableWidget
keyPressed, onClickMethods inherited from class net.minecraft.client.gui.widget.ClickableWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, queueNarration, render, renderBackground, setAlpha, setFocused, setMessage, setWidthMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredText, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
charTyped, keyReleased, mouseMoved, mouseScrolled
-
Constructor Details
-
SilentButtonWidget
protected SilentButtonWidget(int x, int y, int width, int height, net.minecraft.text.Text message, net.minecraft.client.gui.widget.ButtonWidget.PressAction onPress, net.minecraft.client.gui.widget.ButtonWidget.TooltipSupplier tooltipSupplier) Creates a new silent button- Parameters:
x- The x position of the buttony- The y position of the buttonwidth- The width of the buttonheight- The height of the buttonmessage- The text of the buttononPress- The action to be done when the button is pressedtooltipSupplier- The tooltip supplier
-
SilentButtonWidget
public SilentButtonWidget(int x, int y, int width, int height, net.minecraft.text.Text message, net.minecraft.client.gui.widget.ButtonWidget.PressAction onPress) Creates a new silent button- Parameters:
x- The x position of the buttony- The y position of the buttonwidth- The width of the buttonheight- The height of the buttonmessage- The text of the buttononPress- The action to be done when the button is pressed
-
-
Method Details
-
playDownSound
public void playDownSound(net.minecraft.client.sound.SoundManager soundManager) - Overrides:
playDownSoundin classnet.minecraft.client.gui.widget.ClickableWidget
-