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

@Environment(CLIENT) public abstract class PressableWidget extends ClickableWidget
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 eor
intermediary net/minecraft/class_4264
named net/minecraft/client/gui/widget/PressableWidget
  • Field Details

    • field_43046

      protected static final int field_43046
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official g Leor;g: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 h Leor;h: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 i Leor;i: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 j Leor;j: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 k Leor;k: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 l Leor;l: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

      public PressableWidget(int x, int y, int width, int height, Text message)
      Mappings:
      Namespace Name Mixin selector
      official <init> Leox;<init>(IIIILsw;)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 Leor;c()V
      intermediary method_25306 Lnet/minecraft/class_4264;method_25306()V
      named onPress Lnet/minecraft/client/gui/widget/PressableWidget;onPress()V
    • renderButton

      public void renderButton(DrawContext context, int mouseX, int mouseY, float delta)
      Specified by:
      renderButton in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official b Leox;b(Leop;IIF)V
      intermediary method_48579 Lnet/minecraft/class_339;method_48579(Lnet/minecraft/class_332;IIF)V
      named renderButton Lnet/minecraft/client/gui/widget/ClickableWidget;renderButton(Lnet/minecraft/client/gui/DrawContext;IIF)V
    • drawMessage

      public void drawMessage(DrawContext context, TextRenderer textRenderer, int color)
      Mappings:
      Namespace Name Mixin selector
      official a Leor;a(Leop;Leon;I)V
      intermediary method_48589 Lnet/minecraft/class_4264;method_48589(Lnet/minecraft/class_332;Lnet/minecraft/class_327;I)V
      named drawMessage Lnet/minecraft/client/gui/widget/PressableWidget;drawMessage(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/client/font/TextRenderer;I)V
    • getTextureY

      private int getTextureY()
      Mappings:
      Namespace Name Mixin selector
      official a Leor;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 class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official a Leox;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 in GLFW class.
      Parameters:
      keyCode - the named key code of the event as described in the GLFW class
      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:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Leqk;a(III)Z
      intermediary method_25404 Lnet/minecraft/class_364;method_25404(III)Z
      named keyPressed Lnet/minecraft/client/gui/Element;keyPressed(III)Z