Class 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.class_12230
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 ggg
  • Field Details

    • field_43050

      protected 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 Lggg;e:I
    • TEXTURES

      private static final ButtonTextures 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 Lggg;a:Lgig;
  • Constructor Details

    • PressableWidget

      public PressableWidget(int x, int y, int width, int height, Text message)
      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> Lggo;<init>(IIIILym;)V
  • Method Details

    • onPress

      public abstract void onPress(AbstractInput input)
      Mappings:
      Namespace Name Mixin selector
      named onPress Lnet/minecraft/client/gui/widget/PressableWidget;onPress(Lnet/minecraft/client/input/AbstractInput;)V
      intermediary method_25306 Lnet/minecraft/class_4264;method_25306(Lnet/minecraft/class_11907;)V
      official a Lggg;a(Lgwk;)V
    • renderWidget

      protected final void renderWidget(DrawContext context, int mouseX, int mouseY, float deltaTicks)
      Specified by:
      renderWidget in 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 a_ Lggo;a_(Lggd;IIF)V
    • method_75752

      protected abstract void method_75752(DrawContext drawContext, int int2, int int3, float float2)
      Mappings:
      Namespace Name Mixin selector
      named method_75752 Lnet/minecraft/client/gui/widget/PressableWidget;method_75752(Lnet/minecraft/client/gui/DrawContext;IIF)V
      intermediary method_75752 Lnet/minecraft/class_4264;method_75752(Lnet/minecraft/class_332;IIF)V
      official b Lggg;b(Lggd;IIF)V
    • method_75793

      protected void method_75793(class_12225 class_12225)
      Mappings:
      Namespace Name Mixin selector
      named method_75793 Lnet/minecraft/client/gui/widget/PressableWidget;method_75793(Lnet/minecraft/class_12225;)V
      intermediary method_75793 Lnet/minecraft/class_4264;method_75793(Lnet/minecraft/class_12225;)V
      official a Lggg;a(Lgfx;)V
    • method_75794

      protected final void method_75794(DrawContext drawContext)
      Mappings:
      Namespace Name Mixin selector
      named method_75794 Lnet/minecraft/client/gui/widget/PressableWidget;method_75794(Lnet/minecraft/client/gui/DrawContext;)V
      intermediary method_75794 Lnet/minecraft/class_4264;method_75794(Lnet/minecraft/class_332;)V
      official a Lggg;a(Lggd;)V
    • method_75795

      private void method_75795(DrawContext drawContext)
      Mappings:
      Namespace Name Mixin selector
      named method_75795 Lnet/minecraft/client/gui/widget/PressableWidget;method_75795(Lnet/minecraft/client/gui/DrawContext;)V
      intermediary method_75795 Lnet/minecraft/class_4264;method_75795(Lnet/minecraft/class_332;)V
      official b Lggg;b(Lggd;)V
    • onClick

      public void onClick(Click click, boolean doubled)
      Overrides:
      onClick in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      named onClick Lnet/minecraft/client/gui/widget/ClickableWidget;onClick(Lnet/minecraft/client/gui/Click;Z)V
      intermediary method_25348 Lnet/minecraft/class_339;method_25348(Lnet/minecraft/class_11909;Z)V
      official b Lggo;b(Lgwm;Z)V
    • keyPressed

      public boolean keyPressed(KeyInput input)
      Callback for when a key down event has been captured. The key code is identified by the constants in GLFW class.
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named keyPressed Lnet/minecraft/client/gui/Element;keyPressed(Lnet/minecraft/client/input/KeyInput;)Z
      intermediary method_25404 Lnet/minecraft/class_364;method_25404(Lnet/minecraft/class_11908;)Z
      official a Lgjy;a(Lgwl;)Z