Package net.minecraft.client.gui.widget
Class AbstractPressableButtonWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.AbstractButtonWidget
net.minecraft.client.gui.widget.AbstractPressableButtonWidget
- Direct Known Subclasses:
BeaconScreen.BaseButtonWidget
,ButtonWidget
,CheckboxWidget
,CyclingButtonWidget
@Environment(CLIENT) public abstract class AbstractPressableButtonWidget extends AbstractButtonWidget
- Mappings:
Namespace Name official dro
intermediary net/minecraft/class_4264
named net/minecraft/client/gui/widget/AbstractPressableButtonWidget
-
Field Summary
Fields inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, y
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
Constructor Summary
Constructors Constructor Description AbstractPressableButtonWidget(int x, int y, int width, int height, Text message)
-
Method Summary
Modifier and Type Method Description 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()
Methods inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, renderButton, renderToolTip, setAlpha, setFocused, setMessage, setWidth
Methods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, method_33284, 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.Element
charTyped, keyReleased, mouseMoved, mouseScrolled
-
Constructor Details
-
AbstractPressableButtonWidget
- Mappings:
Namespace Name Mixin selector official <init>
Ldrs;<init>(IIIILoi;)V
intermediary <init>
Lnet/minecraft/class_339;<init>(IIIILnet/minecraft/class_2561;)V
named <init>
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;<init>(IIIILnet/minecraft/text/Text;)V
-
-
Method Details
-
onPress
public abstract void onPress()- Mappings:
Namespace Name Mixin selector official b
Ldro;b()V
intermediary method_25306
Lnet/minecraft/class_4264;method_25306()V
named onPress
Lnet/minecraft/client/gui/widget/AbstractPressableButtonWidget;onPress()V
-
onClick
public void onClick(double mouseX, double mouseY)- Overrides:
onClick
in classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official a
Ldrs;a(DD)V
intermediary method_25348
Lnet/minecraft/class_339;method_25348(DD)V
named onClick
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;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:
Keyboard.onKey(long, int, int, int, int)
,GLFW.GLFW_KEY_Q
,GLFWKeyCallbackI.invoke(long, int, int, int, int)
- Mappings:
Namespace Name Mixin selector official a
Ldst;a(III)Z
intermediary method_25404
Lnet/minecraft/class_364;method_25404(III)Z
named keyPressed
Lnet/minecraft/client/gui/Element;keyPressed(III)Z
-