Class WrapperWidget

All Implemented Interfaces:
Drawable, Element, Narratable, ParentElement, Selectable
Direct Known Subclasses:
AxisGridWidget, GridWidget, SimplePositioningWidget

@Environment(CLIENT) public abstract class WrapperWidget extends ClickableWidget implements ParentElement
Mappings:
Namespace Name
official ekr
intermediary net/minecraft/class_7838
named net/minecraft/client/gui/widget/WrapperWidget
  • Field Details

    • focusedElement

      @Nullable private @Nullable Element focusedElement
      Mappings:
      Namespace Name Mixin selector
      official a Lekr;a:Lemg;
      intermediary field_40750 Lnet/minecraft/class_7838;field_40750:Lnet/minecraft/class_364;
      named focusedElement Lnet/minecraft/client/gui/widget/WrapperWidget;focusedElement:Lnet/minecraft/client/gui/Element;
    • dragging

      private boolean dragging
      Mappings:
      Namespace Name Mixin selector
      official b Lekr;b:Z
      intermediary field_40751 Lnet/minecraft/class_7838;field_40751:Z
      named dragging Lnet/minecraft/client/gui/widget/WrapperWidget;dragging:Z
  • Constructor Details

    • WrapperWidget

      public WrapperWidget(int x, int y, int width, int height, Text message)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lekw;<init>(IIIILss;)V
      intermediary <init> Lnet/minecraft/class_339;<init>(IIIILnet/minecraft/class_2561;)V
      named <init> Lnet/minecraft/client/gui/widget/ClickableWidget;<init>(IIIILnet/minecraft/text/Text;)V
  • Method Details

    • renderButton

      public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)
      Overrides:
      renderButton in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official b Lekw;b(Leed;IIF)V
      intermediary method_25359 Lnet/minecraft/class_339;method_25359(Lnet/minecraft/class_4587;IIF)V
      named renderButton Lnet/minecraft/client/gui/widget/ClickableWidget;renderButton(Lnet/minecraft/client/util/math/MatrixStack;IIF)V
    • isMouseOver

      public boolean isMouseOver(double mouseX, double mouseY)
      Checks if the mouse position is within the bound of the element.
      Specified by:
      isMouseOver in interface Element
      Overrides:
      isMouseOver in class ClickableWidget
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      Returns:
      true if the mouse is within the bound of the element, otherwise false
      Mappings:
      Namespace Name Mixin selector
      official c Lemg;c(DD)Z
      intermediary method_25405 Lnet/minecraft/class_364;method_25405(DD)Z
      named isMouseOver Lnet/minecraft/client/gui/Element;isMouseOver(DD)Z
    • mouseMoved

      public void mouseMoved(double mouseX, double mouseY)
      Callback for when a mouse move event has been captured.
      Specified by:
      mouseMoved in interface Element
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Lemg;d(DD)V
      intermediary method_16014 Lnet/minecraft/class_364;method_16014(DD)V
      named mouseMoved Lnet/minecraft/client/gui/Element;mouseMoved(DD)V
    • children

      public List<? extends Element> children()
      Gets a list of all child GUI elements.
      Specified by:
      children in interface ParentElement
      Mappings:
      Namespace Name Mixin selector
      official ak_ Lemf;ak_()Ljava/util/List;
      intermediary method_25396 Lnet/minecraft/class_4069;method_25396()Ljava/util/List;
      named children Lnet/minecraft/client/gui/ParentElement;children()Ljava/util/List;
    • wrappedWidgets

      protected abstract List<? extends ClickableWidget> wrappedWidgets()
      Mappings:
      Namespace Name Mixin selector
      official b Lekr;b()Ljava/util/List;
      intermediary method_46418 Lnet/minecraft/class_7838;method_46418()Ljava/util/List;
      named wrappedWidgets Lnet/minecraft/client/gui/widget/WrapperWidget;wrappedWidgets()Ljava/util/List;
    • isDragging

      public boolean isDragging()
      Specified by:
      isDragging in interface ParentElement
      Mappings:
      Namespace Name Mixin selector
      official al_ Lemf;al_()Z
      intermediary method_25397 Lnet/minecraft/class_4069;method_25397()Z
      named isDragging Lnet/minecraft/client/gui/ParentElement;isDragging()Z
    • setDragging

      public void setDragging(boolean dragging)
      Specified by:
      setDragging in interface ParentElement
      Mappings:
      Namespace Name Mixin selector
      official b_ Lemf;b_(Z)V
      intermediary method_25398 Lnet/minecraft/class_4069;method_25398(Z)V
      named setDragging Lnet/minecraft/client/gui/ParentElement;setDragging(Z)V
    • mouseScrolled

      public boolean mouseScrolled(double mouseX, double mouseY, double amount)
      Callback for when a mouse button scroll event has been captured.
      Specified by:
      mouseScrolled in interface Element
      Specified by:
      mouseScrolled in interface ParentElement
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      amount - value is < 0 if scrolled down, > 0 if scrolled up
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lemg;a(DDD)Z
      intermediary method_25401 Lnet/minecraft/class_364;method_25401(DDD)Z
      named mouseScrolled Lnet/minecraft/client/gui/Element;mouseScrolled(DDD)Z
    • changeFocus

      public boolean changeFocus(boolean lookForwards)
      Changes the focusing element by cycling to the next/previous element. This action is done typically when the user has pressed the 'Tab' or 'Ctrl+Tab' key.
      Specified by:
      changeFocus in interface Element
      Specified by:
      changeFocus in interface ParentElement
      Overrides:
      changeFocus in class ClickableWidget
      Parameters:
      lookForwards - true to cycle forwards, otherwise cycle backwards
      Returns:
      true to indicate that the event handling is successful/valid
      Mappings:
      Namespace Name Mixin selector
      official b Lemg;b(Z)Z
      intermediary method_25407 Lnet/minecraft/class_364;method_25407(Z)Z
      named changeFocus Lnet/minecraft/client/gui/Element;changeFocus(Z)Z
    • getHoveredElement

      @Nullable protected @Nullable Element getHoveredElement()
      Mappings:
      Namespace Name Mixin selector
      official d Lekr;d()Lemg;
      intermediary method_46420 Lnet/minecraft/class_7838;method_46420()Lnet/minecraft/class_364;
      named getHoveredElement Lnet/minecraft/client/gui/widget/WrapperWidget;getHoveredElement()Lnet/minecraft/client/gui/Element;
    • getFocused

      @Nullable public @Nullable Element getFocused()
      Specified by:
      getFocused in interface ParentElement
      Mappings:
      Namespace Name Mixin selector
      official am_ Lemf;am_()Lemg;
      intermediary method_25399 Lnet/minecraft/class_4069;method_25399()Lnet/minecraft/class_364;
      named getFocused Lnet/minecraft/client/gui/ParentElement;getFocused()Lnet/minecraft/client/gui/Element;
    • setFocused

      public void setFocused(@Nullable @Nullable Element focused)
      Specified by:
      setFocused in interface ParentElement
      Mappings:
      Namespace Name Mixin selector
      official a Lemf;a(Lemg;)V
      intermediary method_25395 Lnet/minecraft/class_4069;method_25395(Lnet/minecraft/class_364;)V
      named setFocused Lnet/minecraft/client/gui/ParentElement;setFocused(Lnet/minecraft/client/gui/Element;)V
    • appendClickableNarrations

      public void appendClickableNarrations(NarrationMessageBuilder builder)
      Specified by:
      appendClickableNarrations in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official a Lekw;a(Lenk;)V
      intermediary method_47399 Lnet/minecraft/class_339;method_47399(Lnet/minecraft/class_6382;)V
      named appendClickableNarrations Lnet/minecraft/client/gui/widget/ClickableWidget;appendClickableNarrations(Lnet/minecraft/client/gui/screen/narration/NarrationMessageBuilder;)V
    • getType

      public Selectable.SelectionType getType()
      Specified by:
      getType in interface Selectable
      Overrides:
      getType in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official ap_ Leni;ap_()Leni$a;
      intermediary method_37018 Lnet/minecraft/class_6379;method_37018()Lnet/minecraft/class_6379$class_6380;
      named getType Lnet/minecraft/client/gui/Selectable;getType()Lnet/minecraft/client/gui/Selectable$SelectionType;
    • setX

      public void setX(int x)
      Overrides:
      setX in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official h_ Lekw;h_(I)V
      intermediary method_46421 Lnet/minecraft/class_339;method_46421(I)V
      named setX Lnet/minecraft/client/gui/widget/ClickableWidget;setX(I)V
    • setY

      public void setY(int y)
      Overrides:
      setY in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official b Lekw;b(I)V
      intermediary method_46419 Lnet/minecraft/class_339;method_46419(I)V
      named setY Lnet/minecraft/client/gui/widget/ClickableWidget;setY(I)V
    • hoveredElement

      public Optional<Element> hoveredElement(double mouseX, double mouseY)
      Specified by:
      hoveredElement in interface ParentElement
      Mappings:
      Namespace Name Mixin selector
      official e Lemf;e(DD)Ljava/util/Optional;
      intermediary method_19355 Lnet/minecraft/class_4069;method_19355(DD)Ljava/util/Optional;
      named hoveredElement Lnet/minecraft/client/gui/ParentElement;hoveredElement(DD)Ljava/util/Optional;
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button)
      Callback for when a mouse button down event has been captured. The button number is identified by the constants in GLFW class.
      Specified by:
      mouseClicked in interface Element
      Specified by:
      mouseClicked in interface ParentElement
      Overrides:
      mouseClicked in class ClickableWidget
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      button - the mouse button number
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lemg;a(DDI)Z
      intermediary method_25402 Lnet/minecraft/class_364;method_25402(DDI)Z
      named mouseClicked Lnet/minecraft/client/gui/Element;mouseClicked(DDI)Z
    • mouseReleased

      public boolean mouseReleased(double mouseX, double mouseY, int button)
      Callback for when a mouse button release event has been captured. The button number is identified by the constants in GLFW class.
      Specified by:
      mouseReleased in interface Element
      Specified by:
      mouseReleased in interface ParentElement
      Overrides:
      mouseReleased in class ClickableWidget
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      button - the mouse button number
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lemg;b(DDI)Z
      intermediary method_25406 Lnet/minecraft/class_364;method_25406(DDI)Z
      named mouseReleased Lnet/minecraft/client/gui/Element;mouseReleased(DDI)Z
    • mouseDragged

      public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)
      Callback for when a mouse button drag event has been captured. The button number is identified by the constants in GLFW class.
      Specified by:
      mouseDragged in interface Element
      Specified by:
      mouseDragged in interface ParentElement
      Overrides:
      mouseDragged in class ClickableWidget
      Parameters:
      mouseX - the current X coordinate of the mouse
      mouseY - the current Y coordinate of the mouse
      button - the mouse button number
      deltaX - the difference of the current X with the previous X coordinate
      deltaY - the difference of the current Y with the previous Y coordinate
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lemg;a(DDIDD)Z
      intermediary method_25403 Lnet/minecraft/class_364;method_25403(DDIDD)Z
      named mouseDragged Lnet/minecraft/client/gui/Element;mouseDragged(DDIDD)Z