java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractButton
com.codinglitch.simpleradio.client.core.central.BaseButton
All Implemented Interfaces:
net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Widget, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier
Direct Known Subclasses:
RadiosmitherScreen.KnobButton, RadiosmitherScreen.ModulationButton

public class BaseButton extends net.minecraft.client.gui.components.AbstractButton
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry

    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
    int
     
    final int
     
    final int
     
    boolean
     
    int
     
    int
     
    protected net.minecraft.network.chat.Component
     

    Fields inherited from class net.minecraft.client.gui.components.AbstractWidget

    active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y

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

    BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    BaseButton(int x, int y, int width, int height)
     
    BaseButton(int x, int y, int width, int height, int iconX, int iconY)
     
    BaseButton(int x, int y, int width, int height, int iconX, int iconY, net.minecraft.resources.ResourceLocation texture)
     
    BaseButton(int x, int y, int width, int height, int iconX, int iconY, net.minecraft.resources.ResourceLocation texture, net.minecraft.network.chat.Component component)
     
    BaseButton(int x, int y, int width, int height, int iconX, int iconY, net.minecraft.resources.ResourceLocation texture, net.minecraft.network.chat.Component component, Runnable onPress)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    blit(com.mojang.blaze3d.vertex.PoseStack graphics, int iconX, int iconY)
     
    protected net.minecraft.network.chat.MutableComponent
     
    net.minecraft.resources.ResourceLocation
     
    void
     
    void
    render(com.mojang.blaze3d.vertex.PoseStack stack, int x, int y, float $$3)
     
    void
    renderButton(com.mojang.blaze3d.vertex.PoseStack stack, int mouseX, int mouseY, float delta)
     
    void
    setTooltip(net.minecraft.network.chat.Component tooltip)
     
    void
    updateNarration(net.minecraft.client.gui.narration.NarrationElementOutput output)
     

    Methods inherited from class net.minecraft.client.gui.components.AbstractButton

    keyPressed, onClick

    Methods inherited from class net.minecraft.client.gui.components.AbstractWidget

    changeFocus, clearFGColor, clicked, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, getYImage, isActive, isFocused, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onDrag, onFocusedChanged, onRelease, playDownSound, renderBg, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth, wrapDefaultNarrationMessage

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

    blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine

    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.components.events.GuiEventListener

    charTyped, keyReleased, mouseMoved, mouseScrolled
  • Field Details

    • iconX

      public final int iconX
    • iconY

      public final int iconY
    • hoverIconX

      public int hoverIconX
    • hoverIconY

      public int hoverIconY
    • selectedIconX

      public int selectedIconX
    • selectedIconY

      public int selectedIconY
    • tooltip

      protected net.minecraft.network.chat.Component tooltip
    • selected

      public boolean selected
  • Constructor Details

    • BaseButton

      public BaseButton(int x, int y, int width, int height)
    • BaseButton

      public BaseButton(int x, int y, int width, int height, int iconX, int iconY)
    • BaseButton

      public BaseButton(int x, int y, int width, int height, int iconX, int iconY, net.minecraft.resources.ResourceLocation texture)
    • BaseButton

      public BaseButton(int x, int y, int width, int height, int iconX, int iconY, net.minecraft.resources.ResourceLocation texture, net.minecraft.network.chat.Component component)
    • BaseButton

      public BaseButton(int x, int y, int width, int height, int iconX, int iconY, net.minecraft.resources.ResourceLocation texture, net.minecraft.network.chat.Component component, Runnable onPress)
  • Method Details

    • onPress

      public void onPress()
      Specified by:
      onPress in class net.minecraft.client.gui.components.AbstractButton
    • getTexture

      public net.minecraft.resources.ResourceLocation getTexture()
    • blit

      public void blit(com.mojang.blaze3d.vertex.PoseStack graphics, int iconX, int iconY)
    • render

      public void render(com.mojang.blaze3d.vertex.PoseStack stack, int x, int y, float $$3)
      Specified by:
      render in interface net.minecraft.client.gui.components.Widget
      Overrides:
      render in class net.minecraft.client.gui.components.AbstractWidget
    • renderButton

      public void renderButton(com.mojang.blaze3d.vertex.PoseStack stack, int mouseX, int mouseY, float delta)
      Overrides:
      renderButton in class net.minecraft.client.gui.components.AbstractWidget
    • createNarrationMessage

      protected net.minecraft.network.chat.MutableComponent createNarrationMessage()
      Overrides:
      createNarrationMessage in class net.minecraft.client.gui.components.AbstractWidget
    • updateNarration

      public void updateNarration(net.minecraft.client.gui.narration.NarrationElementOutput output)
    • setTooltip

      public void setTooltip(net.minecraft.network.chat.Component tooltip)