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,net.minecraft.client.gui.Narratable,net.minecraft.client.gui.Selectable
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.TooltipSupplierNested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
net.minecraft.client.gui.Selectable.SelectionType -
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, visible, WIDGETS_TEXTURE, width, x, yFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTUREFields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
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
appendNarrations, onPress, renderButton, renderTooltipMethods inherited from class net.minecraft.client.gui.widget.PressableWidget
keyPressed, onClickMethods inherited from class net.minecraft.client.gui.widget.ClickableWidget
appendDefaultNarrations, changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getType, getWidth, getYImage, isFocused, isHovered, isMouseOver, isNarratable, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, onDrag, onFocusedChanged, onRelease, render, renderBackground, setAlpha, setFocused, setMessage, setWidthMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredText, drawCenteredText, drawCenteredTextWithShadow, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, drawWithOutline, drawWithShadow, fill, fillGradient, fillGradient, fillGradient, getZOffset, 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
-