类 AbstractButtonWidget

    • 字段详细资料

      • WIDGETS_LOCATION

        public static final Identifier WIDGETS_LOCATION
        Mappings:
        Namespace Name Mixin selector
        official i Ldvu;i:Lwp;
        intermediary field_22757 Lnet/minecraft/class_339;field_22757:Lnet/minecraft/class_2960;
        named WIDGETS_LOCATION Lnet/minecraft/client/gui/widget/AbstractButtonWidget;WIDGETS_LOCATION:Lnet/minecraft/util/Identifier;
      • field_32175

        private static final int field_32175
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official a Ldvu;a:I
        intermediary field_32175 Lnet/minecraft/class_339;field_32175:I
        named field_32175 Lnet/minecraft/client/gui/widget/AbstractButtonWidget;field_32175:I
      • field_32176

        private static final int field_32176
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official b Ldvu;b:I
        intermediary field_32176 Lnet/minecraft/class_339;field_32176:I
        named field_32176 Lnet/minecraft/client/gui/widget/AbstractButtonWidget;field_32176:I
      • width

        protected int width
        Mappings:
        Namespace Name Mixin selector
        official j Ldvu;j:I
        intermediary field_22758 Lnet/minecraft/class_339;field_22758:I
        named width Lnet/minecraft/client/gui/widget/AbstractButtonWidget;width:I
      • height

        protected int height
        Mappings:
        Namespace Name Mixin selector
        official k Ldvu;k:I
        intermediary field_22759 Lnet/minecraft/class_339;field_22759:I
        named height Lnet/minecraft/client/gui/widget/AbstractButtonWidget;height:I
      • x

        public int x
        Mappings:
        Namespace Name Mixin selector
        official l Ldvu;l:I
        intermediary field_22760 Lnet/minecraft/class_339;field_22760:I
        named x Lnet/minecraft/client/gui/widget/AbstractButtonWidget;x:I
      • y

        public int y
        Mappings:
        Namespace Name Mixin selector
        official m Ldvu;m:I
        intermediary field_22761 Lnet/minecraft/class_339;field_22761:I
        named y Lnet/minecraft/client/gui/widget/AbstractButtonWidget;y:I
      • message

        private Text message
        Mappings:
        Namespace Name Mixin selector
        official c Ldvu;c:Lon;
        intermediary field_22754 Lnet/minecraft/class_339;field_22754:Lnet/minecraft/class_2561;
        named message Lnet/minecraft/client/gui/widget/AbstractButtonWidget;message:Lnet/minecraft/text/Text;
      • wasHovered

        private boolean wasHovered
        Mappings:
        Namespace Name Mixin selector
        official d Ldvu;d:Z
        intermediary field_22755 Lnet/minecraft/class_339;field_22755:Z
        named wasHovered Lnet/minecraft/client/gui/widget/AbstractButtonWidget;wasHovered:Z
      • hovered

        protected boolean hovered
        Mappings:
        Namespace Name Mixin selector
        official n Ldvu;n:Z
        intermediary field_22762 Lnet/minecraft/class_339;field_22762:Z
        named hovered Lnet/minecraft/client/gui/widget/AbstractButtonWidget;hovered:Z
      • active

        public boolean active
        Mappings:
        Namespace Name Mixin selector
        official o Ldvu;o:Z
        intermediary field_22763 Lnet/minecraft/class_339;field_22763:Z
        named active Lnet/minecraft/client/gui/widget/AbstractButtonWidget;active:Z
      • visible

        public boolean visible
        Mappings:
        Namespace Name Mixin selector
        official p Ldvu;p:Z
        intermediary field_22764 Lnet/minecraft/class_339;field_22764:Z
        named visible Lnet/minecraft/client/gui/widget/AbstractButtonWidget;visible:Z
      • alpha

        protected float alpha
        Mappings:
        Namespace Name Mixin selector
        official q Ldvu;q:F
        intermediary field_22765 Lnet/minecraft/class_339;field_22765:F
        named alpha Lnet/minecraft/client/gui/widget/AbstractButtonWidget;alpha:F
      • nextNarration

        protected long nextNarration
        Mappings:
        Namespace Name Mixin selector
        official r Ldvu;r:J
        intermediary field_22766 Lnet/minecraft/class_339;field_22766:J
        named nextNarration Lnet/minecraft/client/gui/widget/AbstractButtonWidget;nextNarration:J
      • focused

        private boolean focused
        Mappings:
        Namespace Name Mixin selector
        official e Ldvu;e:Z
        intermediary field_22756 Lnet/minecraft/class_339;field_22756:Z
        named focused Lnet/minecraft/client/gui/widget/AbstractButtonWidget;focused:Z
    • 构造器详细资料

      • AbstractButtonWidget

        public AbstractButtonWidget​(int x,
                                    int y,
                                    int width,
                                    int height,
                                    Text message)
        Mappings:
        Namespace Name Mixin selector
        official <init> Ldvu;<init>(IIIILon;)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
    • 方法详细资料

      • getHeight

        public int getHeight()
        Mappings:
        Namespace Name Mixin selector
        official e Ldvu;e()I
        intermediary method_25364 Lnet/minecraft/class_339;method_25364()I
        named getHeight Lnet/minecraft/client/gui/widget/AbstractButtonWidget;getHeight()I
      • getYImage

        protected int getYImage​(boolean hovered)
        Mappings:
        Namespace Name Mixin selector
        official a Ldvu;a(Z)I
        intermediary method_25356 Lnet/minecraft/class_339;method_25356(Z)I
        named getYImage Lnet/minecraft/client/gui/widget/AbstractButtonWidget;getYImage(Z)I
      • render

        public void render​(MatrixStack matrices,
                           int mouseX,
                           int mouseY,
                           float delta)
        指定者:
        render 在接口中 Drawable
        Mappings:
        Namespace Name Mixin selector
        official a Ldws;a(Ldpi;IIF)V
        intermediary method_25394 Lnet/minecraft/class_4068;method_25394(Lnet/minecraft/class_4587;IIF)V
        named render Lnet/minecraft/client/gui/Drawable;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V
      • narrate

        protected void narrate()
        Mappings:
        Namespace Name Mixin selector
        official f Ldvu;f()V
        intermediary method_25366 Lnet/minecraft/class_339;method_25366()V
        named narrate Lnet/minecraft/client/gui/widget/AbstractButtonWidget;narrate()V
      • getNarrationMessage

        protected MutableText getNarrationMessage()
        Mappings:
        Namespace Name Mixin selector
        official c Ldvu;c()Lot;
        intermediary method_25360 Lnet/minecraft/class_339;method_25360()Lnet/minecraft/class_5250;
        named getNarrationMessage Lnet/minecraft/client/gui/widget/AbstractButtonWidget;getNarrationMessage()Lnet/minecraft/text/MutableText;
      • getNarrationMessage

        public static MutableText getNarrationMessage​(Text message)
        Mappings:
        Namespace Name Mixin selector
        official a Ldvu;a(Lon;)Lot;
        intermediary method_32602 Lnet/minecraft/class_339;method_32602(Lnet/minecraft/class_2561;)Lnet/minecraft/class_5250;
        named getNarrationMessage Lnet/minecraft/client/gui/widget/AbstractButtonWidget;getNarrationMessage(Lnet/minecraft/text/Text;)Lnet/minecraft/text/MutableText;
      • renderButton

        public void renderButton​(MatrixStack matrices,
                                 int mouseX,
                                 int mouseY,
                                 float delta)
        Mappings:
        Namespace Name Mixin selector
        official b Ldvu;b(Ldpi;IIF)V
        intermediary method_25359 Lnet/minecraft/class_339;method_25359(Lnet/minecraft/class_4587;IIF)V
        named renderButton Lnet/minecraft/client/gui/widget/AbstractButtonWidget;renderButton(Lnet/minecraft/client/util/math/MatrixStack;IIF)V
      • renderBg

        protected void renderBg​(MatrixStack matrices,
                                MinecraftClient client,
                                int mouseX,
                                int mouseY)
        Mappings:
        Namespace Name Mixin selector
        official a Ldvu;a(Ldpi;Ldum;II)V
        intermediary method_25353 Lnet/minecraft/class_339;method_25353(Lnet/minecraft/class_4587;Lnet/minecraft/class_310;II)V
        named renderBg Lnet/minecraft/client/gui/widget/AbstractButtonWidget;renderBg(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/MinecraftClient;II)V
      • onClick

        public void onClick​(double mouseX,
                            double mouseY)
        Mappings:
        Namespace Name Mixin selector
        official a Ldvu;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
      • onRelease

        public void onRelease​(double mouseX,
                              double mouseY)
        Mappings:
        Namespace Name Mixin selector
        official a_ Ldvu;a_(DD)V
        intermediary method_25357 Lnet/minecraft/class_339;method_25357(DD)V
        named onRelease Lnet/minecraft/client/gui/widget/AbstractButtonWidget;onRelease(DD)V
      • onDrag

        protected void onDrag​(double mouseX,
                              double mouseY,
                              double deltaX,
                              double deltaY)
        Mappings:
        Namespace Name Mixin selector
        official a Ldvu;a(DDDD)V
        intermediary method_25349 Lnet/minecraft/class_339;method_25349(DDDD)V
        named onDrag Lnet/minecraft/client/gui/widget/AbstractButtonWidget;onDrag(DDDD)V
      • mouseClicked

        public boolean mouseClicked​(double mouseX,
                                    double mouseY,
                                    int button)
        Callback for when a mouse button down event has been captured. The button number is identified by the constants in GLFW class.
        指定者:
        mouseClicked 在接口中 Element
        参数:
        mouseX - the X coordinate of the mouse
        mouseY - the Y coordinate of the mouse
        button - the mouse button number
        返回:
        true to indicate that the event handling is successful/valid
        另请参阅:
        Mouse.onMouseButton(long, int, int, int), GLFW.GLFW_MOUSE_BUTTON_1
        Mappings:
        Namespace Name Mixin selector
        official a Ldwv;a(DDI)Z
        intermediary method_25402 Lnet/minecraft/class_364;method_25402(DDI)Z
        named mouseClicked Lnet/minecraft/client/gui/Element;mouseClicked(DDI)Z
      • mouseReleased

        public boolean mouseReleased​(double mouseX,
                                     double mouseY,
                                     int button)
        Callback for when a mouse button release event has been captured. The button number is identified by the constants in GLFW class.
        指定者:
        mouseReleased 在接口中 Element
        参数:
        mouseX - the X coordinate of the mouse
        mouseY - the Y coordinate of the mouse
        button - the mouse button number
        返回:
        true to indicate that the event handling is successful/valid
        另请参阅:
        Mouse.onMouseButton(long, int, int, int), GLFW.GLFW_MOUSE_BUTTON_1
        Mappings:
        Namespace Name Mixin selector
        official c Ldwv;c(DDI)Z
        intermediary method_25406 Lnet/minecraft/class_364;method_25406(DDI)Z
        named mouseReleased Lnet/minecraft/client/gui/Element;mouseReleased(DDI)Z
      • isValidClickButton

        protected boolean isValidClickButton​(int button)
        Mappings:
        Namespace Name Mixin selector
        official a Ldvu;a(I)Z
        intermediary method_25351 Lnet/minecraft/class_339;method_25351(I)Z
        named isValidClickButton Lnet/minecraft/client/gui/widget/AbstractButtonWidget;isValidClickButton(I)Z
      • mouseDragged

        public boolean mouseDragged​(double mouseX,
                                    double mouseY,
                                    int button,
                                    double deltaX,
                                    double deltaY)
        Callback for when a mouse button drag event has been captured. The button number is identified by the constants in GLFW class.
        指定者:
        mouseDragged 在接口中 Element
        参数:
        mouseX - the current X coordinate of the mouse
        mouseY - the current Y coordinate of the mouse
        button - the mouse button number
        deltaX - the difference of the current X with the previous X coordinate
        deltaY - the difference of the current Y with the previous Y coordinate
        返回:
        true to indicate that the event handling is successful/valid
        另请参阅:
        Mouse.onCursorPos(long, double, double), GLFW.GLFW_MOUSE_BUTTON_1
        Mappings:
        Namespace Name Mixin selector
        official a Ldwv;a(DDIDD)Z
        intermediary method_25403 Lnet/minecraft/class_364;method_25403(DDIDD)Z
        named mouseDragged Lnet/minecraft/client/gui/Element;mouseDragged(DDIDD)Z
      • clicked

        protected boolean clicked​(double mouseX,
                                  double mouseY)
        Mappings:
        Namespace Name Mixin selector
        official c Ldvu;c(DD)Z
        intermediary method_25361 Lnet/minecraft/class_339;method_25361(DD)Z
        named clicked Lnet/minecraft/client/gui/widget/AbstractButtonWidget;clicked(DD)Z
      • isHovered

        public boolean isHovered()
        Mappings:
        Namespace Name Mixin selector
        official g Ldvu;g()Z
        intermediary method_25367 Lnet/minecraft/class_339;method_25367()Z
        named isHovered Lnet/minecraft/client/gui/widget/AbstractButtonWidget;isHovered()Z
      • changeFocus

        public boolean changeFocus​(boolean lookForwards)
        Changes the focusing element by cycling to the next/previous element. This action is done typically when the user has pressed the 'Tab' or 'Ctrl+Tab' key.
        指定者:
        changeFocus 在接口中 Element
        参数:
        lookForwards - true to cycle forwards, otherwise cycle backwards
        返回:
        true to indicate that the event handling is successful/valid
        Mappings:
        Namespace Name Mixin selector
        official c_ Ldwv;c_(Z)Z
        intermediary method_25407 Lnet/minecraft/class_364;method_25407(Z)Z
        named changeFocus Lnet/minecraft/client/gui/Element;changeFocus(Z)Z
      • onFocusedChanged

        protected void onFocusedChanged​(boolean bool)
        Mappings:
        Namespace Name Mixin selector
        official c Ldvu;c(Z)V
        intermediary method_25363 Lnet/minecraft/class_339;method_25363(Z)V
        named onFocusedChanged Lnet/minecraft/client/gui/widget/AbstractButtonWidget;onFocusedChanged(Z)V
      • isMouseOver

        public boolean isMouseOver​(double mouseX,
                                   double mouseY)
        Checks if the mouse position is within the bound of the element.
        指定者:
        isMouseOver 在接口中 Element
        参数:
        mouseX - the X coordinate of the mouse
        mouseY - the Y coordinate of the mouse
        返回:
        true if the mouse is within the bound of the element, otherwise false
        Mappings:
        Namespace Name Mixin selector
        official b Ldwv;b(DD)Z
        intermediary method_25405 Lnet/minecraft/class_364;method_25405(DD)Z
        named isMouseOver Lnet/minecraft/client/gui/Element;isMouseOver(DD)Z
      • renderToolTip

        public void renderToolTip​(MatrixStack matrices,
                                  int mouseX,
                                  int mouseY)
        Mappings:
        Namespace Name Mixin selector
        official a Ldvu;a(Ldpi;II)V
        intermediary method_25352 Lnet/minecraft/class_339;method_25352(Lnet/minecraft/class_4587;II)V
        named renderToolTip Lnet/minecraft/client/gui/widget/AbstractButtonWidget;renderToolTip(Lnet/minecraft/client/util/math/MatrixStack;II)V
      • playDownSound

        public void playDownSound​(SoundManager soundManager)
        Mappings:
        Namespace Name Mixin selector
        official a Ldvu;a(Lezu;)V
        intermediary method_25354 Lnet/minecraft/class_339;method_25354(Lnet/minecraft/class_1144;)V
        named playDownSound Lnet/minecraft/client/gui/widget/AbstractButtonWidget;playDownSound(Lnet/minecraft/client/sound/SoundManager;)V
      • getWidth

        public int getWidth()
        Mappings:
        Namespace Name Mixin selector
        official h Ldvu;h()I
        intermediary method_25368 Lnet/minecraft/class_339;method_25368()I
        named getWidth Lnet/minecraft/client/gui/widget/AbstractButtonWidget;getWidth()I
      • setWidth

        public void setWidth​(int value)
        Mappings:
        Namespace Name Mixin selector
        official b Ldvu;b(I)V
        intermediary method_25358 Lnet/minecraft/class_339;method_25358(I)V
        named setWidth Lnet/minecraft/client/gui/widget/AbstractButtonWidget;setWidth(I)V
      • setAlpha

        public void setAlpha​(float value)
        Mappings:
        Namespace Name Mixin selector
        official a Ldvu;a(F)V
        intermediary method_25350 Lnet/minecraft/class_339;method_25350(F)V
        named setAlpha Lnet/minecraft/client/gui/widget/AbstractButtonWidget;setAlpha(F)V
      • setMessage

        public void setMessage​(Text message)
        Mappings:
        Namespace Name Mixin selector
        official b Ldvu;b(Lon;)V
        intermediary method_25355 Lnet/minecraft/class_339;method_25355(Lnet/minecraft/class_2561;)V
        named setMessage Lnet/minecraft/client/gui/widget/AbstractButtonWidget;setMessage(Lnet/minecraft/text/Text;)V
      • queueNarration

        public void queueNarration​(int delay)
        Mappings:
        Namespace Name Mixin selector
        official c Ldvu;c(I)V
        intermediary method_25362 Lnet/minecraft/class_339;method_25362(I)V
        named queueNarration Lnet/minecraft/client/gui/widget/AbstractButtonWidget;queueNarration(I)V
      • getMessage

        public Text getMessage()
        Mappings:
        Namespace Name Mixin selector
        official i Ldvu;i()Lon;
        intermediary method_25369 Lnet/minecraft/class_339;method_25369()Lnet/minecraft/class_2561;
        named getMessage Lnet/minecraft/client/gui/widget/AbstractButtonWidget;getMessage()Lnet/minecraft/text/Text;
      • isFocused

        public boolean isFocused()
        Mappings:
        Namespace Name Mixin selector
        official j Ldvu;j()Z
        intermediary method_25370 Lnet/minecraft/class_339;method_25370()Z
        named isFocused Lnet/minecraft/client/gui/widget/AbstractButtonWidget;isFocused()Z
      • setFocused

        protected void setFocused​(boolean focused)
        Mappings:
        Namespace Name Mixin selector
        official d Ldvu;d(Z)V
        intermediary method_25365 Lnet/minecraft/class_339;method_25365(Z)V
        named setFocused Lnet/minecraft/client/gui/widget/AbstractButtonWidget;setFocused(Z)V