Class CollapsibleWidget

java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
com.pixelmonmod.pixelmon.client.gui.npc.widget.CollapsibleWidget
All Implemented Interfaces:
net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.layouts.LayoutElement, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier

public class CollapsibleWidget extends net.minecraft.client.gui.components.AbstractWidget
  • 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
    protected net.minecraft.network.chat.Component
     
    protected int
     
    protected final List<net.minecraft.client.gui.components.AbstractWidget>
     
    protected boolean
     
    protected net.minecraft.client.gui.components.AbstractWidget
     

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

    active, alpha, focused, height, hoverOrFocusedStartTime, isHovered, message, MIN_SCROLL_PERIOD, packedFGColor, PERIOD_PER_SCROLLED_PIXEL, tabOrderGroup, tooltip, tooltipMsDelay, UNSET_FG_COLOR, visible, wasHoveredOrFocused, width, x, y

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

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    CollapsibleWidget(int width, int height)
     
    CollapsibleWidget(int x, int y, int width, int height)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addElement(net.minecraft.client.gui.components.AbstractWidget widget)
     
    boolean
    charTyped(char character, int modifiers)
     
    protected boolean
    clicked(double mouseX, double mouseY)
     
    int
     
    int
     
    protected boolean
    isValidClickButton(int p_93652_)
     
    boolean
    keyPressed(int keyCode, int scanCode, int modifiers)
     
    boolean
    mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)
     
    boolean
    mouseScrolled(double mouseX, double mouseY, double deltaX, double deltaY)
     
    void
    onClick(double mouseX, double mouseY)
     
    protected void
    renderWidget(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks)
     
    void
    setCollapsedDisplay(net.minecraft.network.chat.Component collapsedDisplay)
     
    void
    setElementPadding(int elementPadding)
     
    void
    setExpanded(boolean expanded)
     
    protected void
    setFocussed(net.minecraft.client.gui.components.AbstractWidget focussed)
     
    protected void
    updateWidgetNarration(net.minecraft.client.gui.narration.NarrationElementOutput p_259858_)
     

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

    clearFGColor, createNarrationMessage, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getMessage, getRectangle, getTabOrderGroup, getTooltip, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, mouseClicked, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setFocused, setHeight, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage

    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

    getCurrentFocusPath, keyReleased, mouseMoved

    Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement

    setPosition
  • Field Details

    • elements

      protected final List<net.minecraft.client.gui.components.AbstractWidget> elements
    • expanded

      protected boolean expanded
    • collapsedDisplay

      protected net.minecraft.network.chat.Component collapsedDisplay
    • elementPadding

      protected int elementPadding
    • focussed

      protected net.minecraft.client.gui.components.AbstractWidget focussed
  • Constructor Details

    • CollapsibleWidget

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

      public CollapsibleWidget(int width, int height)
  • Method Details

    • setExpanded

      public void setExpanded(boolean expanded)
    • setElementPadding

      public void setElementPadding(int elementPadding)
    • setCollapsedDisplay

      public void setCollapsedDisplay(net.minecraft.network.chat.Component collapsedDisplay)
    • addElement

      public void addElement(net.minecraft.client.gui.components.AbstractWidget widget)
    • setFocussed

      protected void setFocussed(net.minecraft.client.gui.components.AbstractWidget focussed)
    • renderWidget

      protected void renderWidget(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks)
      Specified by:
      renderWidget in class net.minecraft.client.gui.components.AbstractWidget
    • clicked

      protected boolean clicked(double mouseX, double mouseY)
      Overrides:
      clicked in class net.minecraft.client.gui.components.AbstractWidget
    • onClick

      public void onClick(double mouseX, double mouseY)
      Overrides:
      onClick in class net.minecraft.client.gui.components.AbstractWidget
    • mouseScrolled

      public boolean mouseScrolled(double mouseX, double mouseY, double deltaX, double deltaY)
    • mouseDragged

      public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)
      Specified by:
      mouseDragged in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseDragged in class net.minecraft.client.gui.components.AbstractWidget
    • keyPressed

      public boolean keyPressed(int keyCode, int scanCode, int modifiers)
    • charTyped

      public boolean charTyped(char character, int modifiers)
    • getHeight

      public int getHeight()
      Specified by:
      getHeight in interface net.minecraft.client.gui.layouts.LayoutElement
      Overrides:
      getHeight in class net.minecraft.client.gui.components.AbstractWidget
    • getWidth

      public int getWidth()
      Specified by:
      getWidth in interface net.minecraft.client.gui.layouts.LayoutElement
      Overrides:
      getWidth in class net.minecraft.client.gui.components.AbstractWidget
    • isValidClickButton

      protected boolean isValidClickButton(int p_93652_)
      Overrides:
      isValidClickButton in class net.minecraft.client.gui.components.AbstractWidget
    • updateWidgetNarration

      protected void updateWidgetNarration(net.minecraft.client.gui.narration.NarrationElementOutput p_259858_)
      Specified by:
      updateWidgetNarration in class net.minecraft.client.gui.components.AbstractWidget