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 ekr
intermediary net/minecraft/class_7838
named net/minecraft/client/gui/widget/WrapperWidget
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
Selectable.SelectionType
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
Fields inherited from class net.minecraft.client.gui.widget.ClickableWidget
active, alpha, height, hovered, visible, WIDGETS_TEXTURE, width
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
changeFocus
(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) boolean
boolean
isMouseOver
(double mouseX, double mouseY) Checks if the mouse position is within the bound of the element.boolean
mouseClicked
(double mouseX, double mouseY, int button) Callback for when a mouse button down event has been captured.boolean
mouseDragged
(double mouseX, double mouseY, int button, double deltaX, double deltaY) Callback for when a mouse button drag event has been captured.void
mouseMoved
(double mouseX, double mouseY) Callback for when a mouse move event has been captured.boolean
mouseReleased
(double mouseX, double mouseY, int button) Callback for when a mouse button release event has been captured.boolean
mouseScrolled
(double mouseX, double mouseY, double amount) Callback for when a mouse button scroll event has been captured.void
renderButton
(MatrixStack matrices, int mouseX, int mouseY, float delta) void
setDragging
(boolean dragging) void
setFocused
(@Nullable Element focused) void
setX
(int x) void
setY
(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, 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.ParentElement
charTyped, focusOn, keyPressed, keyReleased, setInitialFocus
-
Field Details
-
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
- 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
- Overrides:
renderButton
in classClickableWidget
- 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 interfaceElement
- Overrides:
isMouseOver
in classClickableWidget
- Parameters:
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mouse- Returns:
true
if the mouse is within the bound of the element, otherwisefalse
- 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 interfaceElement
- Parameters:
mouseX
- the X coordinate of the mousemouseY
- 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
Gets a list of all child GUI elements.- Specified by:
children
in interfaceParentElement
- 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
- 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 interfaceParentElement
- 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 interfaceParentElement
- 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 interfaceElement
- Specified by:
mouseScrolled
in interfaceParentElement
- Parameters:
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mouseamount
- 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 interfaceElement
- Specified by:
changeFocus
in interfaceParentElement
- Overrides:
changeFocus
in classClickableWidget
- 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
- 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
- Specified by:
getFocused
in interfaceParentElement
- 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
- Specified by:
setFocused
in interfaceParentElement
- 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
- Specified by:
appendClickableNarrations
in classClickableWidget
- 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
- Specified by:
getType
in interfaceSelectable
- Overrides:
getType
in classClickableWidget
- 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 classClickableWidget
- 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 classClickableWidget
- 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
- Specified by:
hoveredElement
in interfaceParentElement
- 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 inGLFW
class.- Specified by:
mouseClicked
in interfaceElement
- Specified by:
mouseClicked
in interfaceParentElement
- Overrides:
mouseClicked
in classClickableWidget
- Parameters:
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mousebutton
- 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 inGLFW
class.- Specified by:
mouseReleased
in interfaceElement
- Specified by:
mouseReleased
in interfaceParentElement
- Overrides:
mouseReleased
in classClickableWidget
- Parameters:
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mousebutton
- 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 inGLFW
class.- Specified by:
mouseDragged
in interfaceElement
- Specified by:
mouseDragged
in interfaceParentElement
- Overrides:
mouseDragged
in 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:
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
-