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,- Selectable
- 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 - ehi- intermediary - net/minecraft/class_4264- named - net/minecraft/client/gui/widget/PressableWidget
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.client.gui.SelectableSelectable.SelectionType
- 
Field SummaryFields inherited from class net.minecraft.client.gui.widget.ClickableWidgetactive, alpha, height, hovered, visible, WIDGETS_TEXTURE, width, x, yFields inherited from class net.minecraft.client.gui.DrawableHelperGUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTUREFields inherited from interface net.minecraft.client.gui.ElementMAX_DOUBLE_CLICK_INTERVAL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleankeyPressed(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured.voidonClick(double mouseX, double mouseY) abstract voidonPress()Methods inherited from class net.minecraft.client.gui.widget.ClickableWidgetappendDefaultNarrations, changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getType, getWidth, getYImage, isFocused, isHovered, isMouseOver, isNarratable, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, onDrag, onFocusedChanged, onRelease, playDownSound, render, renderBackground, renderButton, renderTooltip, setAlpha, setFocused, setMessage, setWidthMethods inherited from class net.minecraft.client.gui.DrawableHelperdisableScissor, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.ElementcharTyped, keyReleased, mouseMoved, mouseScrolledMethods inherited from interface net.minecraft.client.gui.NarratableappendNarrations
- 
Constructor Details- 
PressableWidget- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lehn;<init>(IIIILrq;)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- 
onPresspublic abstract void onPress()- Mappings:
- Namespace - Name - Mixin selector - official - d- Lehi;d()V- intermediary - method_25306- Lnet/minecraft/class_4264;method_25306()V- named - onPress- Lnet/minecraft/client/gui/widget/PressableWidget;onPress()V
 
- 
onClickpublic void onClick(double mouseX, double mouseY) - Overrides:
- onClickin class- ClickableWidget
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lehn;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
 
- 
keyPressedpublic 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 inGLFWclass.- Parameters:
- keyCode- the named key code of the event as described in the- GLFWclass
- scanCode- the unique/platform-specific scan code of the keyboard input
- modifiers- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)
- Returns:
- trueto indicate that the event handling is successful/valid
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Leir;a(III)Z- intermediary - method_25404- Lnet/minecraft/class_364;method_25404(III)Z- named - keyPressed- Lnet/minecraft/client/gui/Element;keyPressed(III)Z
 
 
-