Package net.minecraft.client.gui.widget
Class PressableWidget
java.lang.Object
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 - named - net/minecraft/client/gui/widget/PressableWidget- intermediary - net/minecraft/class_4264- official - foj
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.client.gui.SelectableSelectable.SelectionType
- 
Field SummaryFieldsFields inherited from class net.minecraft.client.gui.widget.ClickableWidgetactive, alpha, height, hovered, visible, widthFields inherited from interface net.minecraft.client.gui.ElementMAX_DOUBLE_CLICK_INTERVAL
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddrawMessage(DrawContext context, TextRenderer textRenderer, int color) booleankeyPressed(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured.voidonClick(double mouseX, double mouseY) abstract voidonPress()protected voidrenderWidget(DrawContext context, int mouseX, int mouseY, float delta) Methods inherited from class net.minecraft.client.gui.widget.ClickableWidgetappendClickableNarrations, appendDefaultNarrations, appendNarrations, drawScrollableText, drawScrollableText, drawScrollableText, forEachChild, getBottom, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getNavigationFocus, getNavigationOrder, getNavigationPath, getRight, getTooltip, getType, getWidth, getX, getY, isFocused, isHovered, isMouseOver, isNarratable, isSelected, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, onDrag, onRelease, playClickSound, playDownSound, render, setAlpha, setDimensions, setDimensionsAndPosition, setFocused, setHeight, setMessage, setNavigationOrder, setTooltip, setTooltipDelay, setWidth, setX, setYMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.ElementcharTyped, getBorder, getFocusedPath, keyReleased, mouseMoved, mouseScrolledMethods inherited from interface net.minecraft.client.gui.SelectablegetNarratedPartsMethods inherited from interface net.minecraft.client.gui.widget.WidgetsetPosition
- 
Field Details- 
field_43050protected static final int field_43050- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - field_43050- Lnet/minecraft/client/gui/widget/PressableWidget;field_43050:I- intermediary - field_43050- Lnet/minecraft/class_4264;field_43050:I- official - e- Lfoj;e:I
 
- 
TEXTURES- Mappings:
- Namespace - Name - Mixin selector - named - TEXTURES- Lnet/minecraft/client/gui/widget/PressableWidget;TEXTURES:Lnet/minecraft/client/gui/screen/ButtonTextures;- intermediary - field_45339- Lnet/minecraft/class_4264;field_45339:Lnet/minecraft/class_8666;- official - a- Lfoj;a:Lfqh;
 
 
- 
- 
Constructor Details- 
PressableWidget- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/client/gui/widget/ClickableWidget;<init>(IIIILnet/minecraft/text/Text;)V- intermediary - <init>- Lnet/minecraft/class_339;<init>(IIIILnet/minecraft/class_2561;)V- official - <init>- Lfos;<init>(IIIILwp;)V
 
 
- 
- 
Method Details- 
onPresspublic abstract void onPress()- Mappings:
- Namespace - Name - Mixin selector - named - onPress- Lnet/minecraft/client/gui/widget/PressableWidget;onPress()V- intermediary - method_25306- Lnet/minecraft/class_4264;method_25306()V- official - b- Lfoj;b()V
 
- 
renderWidget- Specified by:
- renderWidgetin class- ClickableWidget
- Mappings:
- Namespace - Name - Mixin selector - named - renderWidget- Lnet/minecraft/client/gui/widget/ClickableWidget;renderWidget(Lnet/minecraft/client/gui/DrawContext;IIF)V- intermediary - method_48579- Lnet/minecraft/class_339;method_48579(Lnet/minecraft/class_332;IIF)V- official - b- Lfos;b(Lfof;IIF)V
 
- 
drawMessage- Mappings:
- Namespace - Name - Mixin selector - named - drawMessage- Lnet/minecraft/client/gui/widget/PressableWidget;drawMessage(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/client/font/TextRenderer;I)V- intermediary - method_48589- Lnet/minecraft/class_4264;method_48589(Lnet/minecraft/class_332;Lnet/minecraft/class_327;I)V- official - a- Lfoj;a(Lfof;Lfod;I)V
 
- 
onClickpublic void onClick(double mouseX, double mouseY) - Overrides:
- onClickin class- ClickableWidget
- Mappings:
- Namespace - Name - Mixin selector - named - onClick- Lnet/minecraft/client/gui/widget/ClickableWidget;onClick(DD)V- intermediary - method_25348- Lnet/minecraft/class_339;method_25348(DD)V- official - a- Lfos;a(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 - named - keyPressed- Lnet/minecraft/client/gui/Element;keyPressed(III)Z- intermediary - method_25404- Lnet/minecraft/class_364;method_25404(III)Z- official - a- Lfqr;a(III)Z
 
 
-