Package net.minecraft.client.gui.widget
Class PressableWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.ClickableWidget
net.minecraft.client.gui.widget.PressableWidget
- All Implemented Interfaces:
Drawable
,Element
,Narratable
,Navigable
,Selectable
,Widget
- Direct Known Subclasses:
BeaconScreen.BaseButtonWidget
,ButtonWidget
,CheckboxWidget
,CyclingButtonWidget
A pressable widget has a press action. It is pressed when it is clicked. It is
also pressed when enter or space keys are pressed when it is selected.
- Mappings:
Namespace Name official ent
intermediary net/minecraft/class_4264
named net/minecraft/client/gui/widget/PressableWidget
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
Selectable.SelectionType
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
Fields inherited from class net.minecraft.client.gui.widget.ClickableWidget
ACCESSIBILITY_TEXTURE, active, alpha, height, hovered, visible, WIDGETS_TEXTURE, width
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, LIGHT_DIRT_BACKGROUND_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
drawMessage
(MatrixStack matrices, TextRenderer textRenderer, int color) private int
boolean
keyPressed
(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured.void
onClick
(double mouseX, double mouseY) abstract void
onPress()
void
renderButton
(MatrixStack matrices, int mouseX, int mouseY, float delta) Methods inherited from class net.minecraft.client.gui.widget.ClickableWidget
appendClickableNarrations, appendDefaultNarrations, appendNarrations, clicked, drawScrollableText, drawScrollableText, drawTexture, forEachChild, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getNavigationFocus, getNavigationOrder, getNavigationPath, getTooltipPositioner, getType, getWidth, getX, getY, isFocused, isHovered, isMouseOver, isNarratable, isSelected, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, onDrag, onRelease, playDownSound, render, setAlpha, setFocused, setMessage, setNavigationOrder, setTooltip, setTooltipDelay, setWidth, setX, setY
Methods inherited from class net.minecraft.client.gui.DrawableHelper
disableScissor, drawBorder, drawCenteredTextWithShadow, drawCenteredTextWithShadow, drawCenteredTextWithShadow, drawHorizontalLine, drawNineSlicedTexture, drawNineSlicedTexture, drawNineSlicedTexture, drawRepeatingTexture, drawSprite, drawSprite, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawTextWithShadow, drawTextWithShadow, drawVerticalLine, drawWithOutline, enableScissor, fill, fill, fillGradient, fillGradient, fillGradient
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.Element
charTyped, getFocusedPath, keyReleased, mouseMoved, mouseScrolled
Methods inherited from interface net.minecraft.client.gui.widget.Widget
setPosition
-
Field Details
-
field_43046
protected static final int field_43046- See Also:
- Mappings:
Namespace Name Mixin selector official k
Lent;k:I
intermediary field_43046
Lnet/minecraft/class_4264;field_43046:I
named field_43046
Lnet/minecraft/client/gui/widget/PressableWidget;field_43046:I
-
field_43047
protected static final int field_43047- See Also:
- Mappings:
Namespace Name Mixin selector official l
Lent;l:I
intermediary field_43047
Lnet/minecraft/class_4264;field_43047:I
named field_43047
Lnet/minecraft/client/gui/widget/PressableWidget;field_43047:I
-
field_43048
protected static final int field_43048- See Also:
- Mappings:
Namespace Name Mixin selector official m
Lent;m:I
intermediary field_43048
Lnet/minecraft/class_4264;field_43048:I
named field_43048
Lnet/minecraft/client/gui/widget/PressableWidget;field_43048:I
-
field_43100
protected static final int field_43100- See Also:
- Mappings:
Namespace Name Mixin selector official n
Lent;n:I
intermediary field_43100
Lnet/minecraft/class_4264;field_43100:I
named field_43100
Lnet/minecraft/client/gui/widget/PressableWidget;field_43100:I
-
field_43101
protected static final int field_43101- See Also:
- Mappings:
Namespace Name Mixin selector official o
Lent;o:I
intermediary field_43101
Lnet/minecraft/class_4264;field_43101:I
named field_43101
Lnet/minecraft/client/gui/widget/PressableWidget;field_43101:I
-
field_43050
protected static final int field_43050- See Also:
- Mappings:
Namespace Name Mixin selector official p
Lent;p:I
intermediary field_43050
Lnet/minecraft/class_4264;field_43050:I
named field_43050
Lnet/minecraft/client/gui/widget/PressableWidget;field_43050:I
-
-
Constructor Details
-
PressableWidget
- Mappings:
Namespace Name Mixin selector official <init>
Lenz;<init>(IIIILtj;)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
-
onPress
public abstract void onPress()- Mappings:
Namespace Name Mixin selector official c
Lent;c()V
intermediary method_25306
Lnet/minecraft/class_4264;method_25306()V
named onPress
Lnet/minecraft/client/gui/widget/PressableWidget;onPress()V
-
renderButton
- Specified by:
renderButton
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official b
Lenz;b(Lehe;IIF)V
intermediary method_48579
Lnet/minecraft/class_339;method_48579(Lnet/minecraft/class_4587;IIF)V
named renderButton
Lnet/minecraft/client/gui/widget/ClickableWidget;renderButton(Lnet/minecraft/client/util/math/MatrixStack;IIF)V
-
drawMessage
- Mappings:
Namespace Name Mixin selector official a
Lent;a(Lehe;Lenp;I)V
intermediary method_48589
Lnet/minecraft/class_4264;method_48589(Lnet/minecraft/class_4587;Lnet/minecraft/class_327;I)V
named drawMessage
Lnet/minecraft/client/gui/widget/PressableWidget;drawMessage(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/font/TextRenderer;I)V
-
getTextureY
private int getTextureY()- Mappings:
Namespace Name Mixin selector official a
Lent;a()I
intermediary method_49602
Lnet/minecraft/class_4264;method_49602()I
named getTextureY
Lnet/minecraft/client/gui/widget/PressableWidget;getTextureY()I
-
onClick
public void onClick(double mouseX, double mouseY) - Overrides:
onClick
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official a
Lenz;a(DD)V
intermediary method_25348
Lnet/minecraft/class_339;method_25348(DD)V
named onClick
Lnet/minecraft/client/gui/widget/ClickableWidget;onClick(DD)V
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured. The key code is identified by the constants inGLFW
class.- Parameters:
keyCode
- the named key code of the event as described in theGLFW
classscanCode
- the unique/platform-specific scan code of the keyboard inputmodifiers
- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)- Returns:
true
to indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lepl;a(III)Z
intermediary method_25404
Lnet/minecraft/class_364;method_25404(III)Z
named keyPressed
Lnet/minecraft/client/gui/Element;keyPressed(III)Z
-