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.TooltipSupplier

    Nested 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, field_39499, field_39500, field_39501, onPress, tooltipSupplier

    Fields inherited from class net.minecraft.client.gui.widget.ClickableWidget

    active, alpha, height, hovered, visible, WIDGETS_TEXTURE, width, x, y

    Fields inherited from class net.minecraft.client.gui.DrawableHelper

    GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE

    Fields inherited from interface net.minecraft.client.gui.Element

    MAX_DOUBLE_CLICK_INTERVAL
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    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
    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
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    playDownSound(net.minecraft.client.sound.SoundManager soundManager)
     

    Methods inherited from class net.minecraft.client.gui.widget.ButtonWidget

    appendNarrations, onPress, renderButton, renderTooltip

    Methods inherited from class net.minecraft.client.gui.widget.PressableWidget

    keyPressed, onClick

    Methods 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, setWidth

    Methods inherited from class net.minecraft.client.gui.DrawableHelper

    disableScissor, drawCenteredText, drawCenteredText, drawCenteredTextWithShadow, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, drawWithOutline, drawWithShadow, enableScissor, fill, fillGradient, fillGradient, fillGradient, getZOffset, setZOffset

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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 button
      y - The y position of the button
      width - The width of the button
      height - The height of the button
      message - The text of the button
      onPress - The action to be done when the button is pressed
      tooltipSupplier - 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 button
      y - The y position of the button
      width - The width of the button
      height - The height of the button
      message - The text of the button
      onPress - The action to be done when the button is pressed
  • Method Details

    • playDownSound

      public void playDownSound(net.minecraft.client.sound.SoundManager soundManager)
      Overrides:
      playDownSound in class net.minecraft.client.gui.widget.ClickableWidget