Package net.minecraft.client.gui.widget
Class WrapperWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.ClickableWidget
net.minecraft.client.gui.widget.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 ekrintermediary net/minecraft/class_7838named net/minecraft/client/gui/widget/WrapperWidget
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
Selectable.SelectionType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanFields inherited from class net.minecraft.client.gui.widget.ClickableWidget
active, alpha, height, hovered, visible, WIDGETS_TEXTURE, widthFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanchangeFocus(boolean lookForwards) Changes the focusing element by cycling to the next/previous element.children()Gets a list of all child GUI elements.getType()hoveredElement(double mouseX, double mouseY) booleanbooleanisMouseOver(double mouseX, double mouseY) Checks if the mouse position is within the bound of the element.booleanmouseClicked(double mouseX, double mouseY, int button) Callback for when a mouse button down event has been captured.booleanmouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) Callback for when a mouse button drag event has been captured.voidmouseMoved(double mouseX, double mouseY) Callback for when a mouse move event has been captured.booleanmouseReleased(double mouseX, double mouseY, int button) Callback for when a mouse button release event has been captured.booleanmouseScrolled(double mouseX, double mouseY, double amount) Callback for when a mouse button scroll event has been captured.voidrenderButton(MatrixStack matrices, int mouseX, int mouseY, float delta) voidsetDragging(boolean dragging) voidsetFocused(@Nullable Element focused) voidsetX(int x) voidsetY(int y) protected abstract List<? extends ClickableWidget>Methods inherited from class net.minecraft.client.gui.widget.ClickableWidget
appendDefaultNarrations, appendNarrations, clicked, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getTooltipPositioner, getWidth, getX, getY, getYImage, isFocused, isHovered, isNarratable, isValidClickButton, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, render, renderBackground, setAlpha, setFocused, setMessage, setPos, setTooltip, setTooltipDelay, setWidthMethods 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, 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.ParentElement
charTyped, focusOn, keyPressed, keyReleased, setInitialFocus
-
Field Details
-
focusedElement
- Mappings:
Namespace Name Mixin selector official aLekr;a:Lemg;intermediary field_40750Lnet/minecraft/class_7838;field_40750:Lnet/minecraft/class_364;named focusedElementLnet/minecraft/client/gui/widget/WrapperWidget;focusedElement:Lnet/minecraft/client/gui/Element;
-
dragging
private boolean dragging- Mappings:
Namespace Name Mixin selector official bLekr;b:Zintermediary field_40751Lnet/minecraft/class_7838;field_40751:Znamed draggingLnet/minecraft/client/gui/widget/WrapperWidget;dragging:Z
-
-
Constructor Details
-
WrapperWidget
- Mappings:
Namespace Name Mixin selector official <init>Lekw;<init>(IIIILss;)Vintermediary <init>Lnet/minecraft/class_339;<init>(IIIILnet/minecraft/class_2561;)Vnamed <init>Lnet/minecraft/client/gui/widget/ClickableWidget;<init>(IIIILnet/minecraft/text/Text;)V
-
-
Method Details
-
renderButton
- Overrides:
renderButtonin classClickableWidget- Mappings:
Namespace Name Mixin selector official bLekw;b(Leed;IIF)Vintermediary method_25359Lnet/minecraft/class_339;method_25359(Lnet/minecraft/class_4587;IIF)Vnamed renderButtonLnet/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:
isMouseOverin interfaceElement- Overrides:
isMouseOverin classClickableWidget- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mouse- Returns:
trueif the mouse is within the bound of the element, otherwisefalse- Mappings:
Namespace Name Mixin selector official cLemg;c(DD)Zintermediary method_25405Lnet/minecraft/class_364;method_25405(DD)Znamed isMouseOverLnet/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:
mouseMovedin interfaceElement- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mouse- See Also:
- Mappings:
Namespace Name Mixin selector official dLemg;d(DD)Vintermediary method_16014Lnet/minecraft/class_364;method_16014(DD)Vnamed mouseMovedLnet/minecraft/client/gui/Element;mouseMoved(DD)V
-
children
Gets a list of all child GUI elements.- Specified by:
childrenin interfaceParentElement- Mappings:
Namespace Name Mixin selector official ak_Lemf;ak_()Ljava/util/List;intermediary method_25396Lnet/minecraft/class_4069;method_25396()Ljava/util/List;named childrenLnet/minecraft/client/gui/ParentElement;children()Ljava/util/List;
-
wrappedWidgets
- Mappings:
Namespace Name Mixin selector official bLekr;b()Ljava/util/List;intermediary method_46418Lnet/minecraft/class_7838;method_46418()Ljava/util/List;named wrappedWidgetsLnet/minecraft/client/gui/widget/WrapperWidget;wrappedWidgets()Ljava/util/List;
-
isDragging
public boolean isDragging()- Specified by:
isDraggingin interfaceParentElement- Mappings:
Namespace Name Mixin selector official al_Lemf;al_()Zintermediary method_25397Lnet/minecraft/class_4069;method_25397()Znamed isDraggingLnet/minecraft/client/gui/ParentElement;isDragging()Z
-
setDragging
public void setDragging(boolean dragging) - Specified by:
setDraggingin interfaceParentElement- Mappings:
Namespace Name Mixin selector official b_Lemf;b_(Z)Vintermediary method_25398Lnet/minecraft/class_4069;method_25398(Z)Vnamed setDraggingLnet/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:
mouseScrolledin interfaceElement- Specified by:
mouseScrolledin interfaceParentElement- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mouseamount- value is< 0if scrolled down,> 0if scrolled up- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector official aLemg;a(DDD)Zintermediary method_25401Lnet/minecraft/class_364;method_25401(DDD)Znamed mouseScrolledLnet/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:
changeFocusin interfaceElement- Specified by:
changeFocusin interfaceParentElement- Overrides:
changeFocusin classClickableWidget- Parameters:
lookForwards-trueto cycle forwards, otherwise cycle backwards- Returns:
trueto indicate that the event handling is successful/valid- Mappings:
Namespace Name Mixin selector official bLemg;b(Z)Zintermediary method_25407Lnet/minecraft/class_364;method_25407(Z)Znamed changeFocusLnet/minecraft/client/gui/Element;changeFocus(Z)Z
-
getHoveredElement
- Mappings:
Namespace Name Mixin selector official dLekr;d()Lemg;intermediary method_46420Lnet/minecraft/class_7838;method_46420()Lnet/minecraft/class_364;named getHoveredElementLnet/minecraft/client/gui/widget/WrapperWidget;getHoveredElement()Lnet/minecraft/client/gui/Element;
-
getFocused
- Specified by:
getFocusedin interfaceParentElement- Mappings:
Namespace Name Mixin selector official am_Lemf;am_()Lemg;intermediary method_25399Lnet/minecraft/class_4069;method_25399()Lnet/minecraft/class_364;named getFocusedLnet/minecraft/client/gui/ParentElement;getFocused()Lnet/minecraft/client/gui/Element;
-
setFocused
- Specified by:
setFocusedin interfaceParentElement- Mappings:
Namespace Name Mixin selector official aLemf;a(Lemg;)Vintermediary method_25395Lnet/minecraft/class_4069;method_25395(Lnet/minecraft/class_364;)Vnamed setFocusedLnet/minecraft/client/gui/ParentElement;setFocused(Lnet/minecraft/client/gui/Element;)V
-
appendClickableNarrations
- Specified by:
appendClickableNarrationsin classClickableWidget- Mappings:
Namespace Name Mixin selector official aLekw;a(Lenk;)Vintermediary method_47399Lnet/minecraft/class_339;method_47399(Lnet/minecraft/class_6382;)Vnamed appendClickableNarrationsLnet/minecraft/client/gui/widget/ClickableWidget;appendClickableNarrations(Lnet/minecraft/client/gui/screen/narration/NarrationMessageBuilder;)V
-
getType
- Specified by:
getTypein interfaceSelectable- Overrides:
getTypein classClickableWidget- Mappings:
Namespace Name Mixin selector official ap_Leni;ap_()Leni$a;intermediary method_37018Lnet/minecraft/class_6379;method_37018()Lnet/minecraft/class_6379$class_6380;named getTypeLnet/minecraft/client/gui/Selectable;getType()Lnet/minecraft/client/gui/Selectable$SelectionType;
-
setX
public void setX(int x) - Overrides:
setXin classClickableWidget- Mappings:
Namespace Name Mixin selector official h_Lekw;h_(I)Vintermediary method_46421Lnet/minecraft/class_339;method_46421(I)Vnamed setXLnet/minecraft/client/gui/widget/ClickableWidget;setX(I)V
-
setY
public void setY(int y) - Overrides:
setYin classClickableWidget- Mappings:
Namespace Name Mixin selector official bLekw;b(I)Vintermediary method_46419Lnet/minecraft/class_339;method_46419(I)Vnamed setYLnet/minecraft/client/gui/widget/ClickableWidget;setY(I)V
-
hoveredElement
- Specified by:
hoveredElementin interfaceParentElement- Mappings:
Namespace Name Mixin selector official eLemf;e(DD)Ljava/util/Optional;intermediary method_19355Lnet/minecraft/class_4069;method_19355(DD)Ljava/util/Optional;named hoveredElementLnet/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 inGLFWclass.- Specified by:
mouseClickedin interfaceElement- Specified by:
mouseClickedin interfaceParentElement- Overrides:
mouseClickedin classClickableWidget- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousebutton- the mouse button number- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector official aLemg;a(DDI)Zintermediary method_25402Lnet/minecraft/class_364;method_25402(DDI)Znamed mouseClickedLnet/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 inGLFWclass.- Specified by:
mouseReleasedin interfaceElement- Specified by:
mouseReleasedin interfaceParentElement- Overrides:
mouseReleasedin classClickableWidget- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousebutton- the mouse button number- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector official bLemg;b(DDI)Zintermediary method_25406Lnet/minecraft/class_364;method_25406(DDI)Znamed mouseReleasedLnet/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 inGLFWclass.- Specified by:
mouseDraggedin interfaceElement- Specified by:
mouseDraggedin interfaceParentElement- Overrides:
mouseDraggedin classClickableWidget- Parameters:
mouseX- the current X coordinate of the mousemouseY- the current Y coordinate of the mousebutton- the mouse button numberdeltaX- the difference of the current X with the previous X coordinatedeltaY- the difference of the current Y with the previous Y coordinate- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector official aLemg;a(DDIDD)Zintermediary method_25403Lnet/minecraft/class_364;method_25403(DDIDD)Znamed mouseDraggedLnet/minecraft/client/gui/Element;mouseDragged(DDIDD)Z
-