接口 ParentElement

    • 方法概要

      所有方法 实例方法 抽象方法 默认方法 
      修饰符和类型 方法 说明
      default boolean changeFocus​(boolean lookForwards)
      Changes the focusing element by cycling to the next/previous element.
      default boolean charTyped​(char chr, int modifiers)
      Callback for when a character input has been captured.
      List<? extends Element> children()
      Gets a list of all child GUI elements.
      default void focusOn​(@Nullable Element element)  
      @Nullable Element getFocused()  
      default Optional<Element> hoveredElement​(double mouseX, double mouseY)  
      boolean isDragging()  
      default boolean keyPressed​(int keyCode, int scanCode, int modifiers)
      Callback for when a key down event has been captured.
      default boolean keyReleased​(int keyCode, int scanCode, int modifiers)
      Callback for when a key down event has been captured.
      default boolean mouseClicked​(double mouseX, double mouseY, int button)
      Callback for when a mouse button down event has been captured.
      default boolean mouseDragged​(double mouseX, double mouseY, int button, double deltaX, double deltaY)
      Callback for when a mouse button drag event has been captured.
      default boolean mouseReleased​(double mouseX, double mouseY, int button)
      Callback for when a mouse button release event has been captured.
      default boolean mouseScrolled​(double mouseX, double mouseY, double amount)
      Callback for when a mouse button scroll event has been captured.
      void setDragging​(boolean dragging)  
      void setFocused​(@Nullable Element focused)  
      default void setInitialFocus​(@Nullable Element element)  
    • 方法详细资料

      • children

        List<? extends Element> children()
        Gets a list of all child GUI elements.
        Mappings:
        Namespace Name Mixin selector
        official aB_ Ldwu;aB_()Ljava/util/List;
        intermediary method_25396 Lnet/minecraft/class_4069;method_25396()Ljava/util/List;
        named children Lnet/minecraft/client/gui/ParentElement;children()Ljava/util/List;
      • hoveredElement

        default Optional<Element> hoveredElement​(double mouseX,
                                                 double mouseY)
        Mappings:
        Namespace Name Mixin selector
        official d Ldwu;d(DD)Ljava/util/Optional;
        intermediary method_19355 Lnet/minecraft/class_4069;method_19355(DD)Ljava/util/Optional;
        named hoveredElement Lnet/minecraft/client/gui/ParentElement;hoveredElement(DD)Ljava/util/Optional;
      • mouseClicked

        default 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

        default 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
      • mouseDragged

        default 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
      • isDragging

        boolean isDragging()
        Mappings:
        Namespace Name Mixin selector
        official aD_ Ldwu;aD_()Z
        intermediary method_25397 Lnet/minecraft/class_4069;method_25397()Z
        named isDragging Lnet/minecraft/client/gui/ParentElement;isDragging()Z
      • setDragging

        void setDragging​(boolean dragging)
        Mappings:
        Namespace Name Mixin selector
        official b_ Ldwu;b_(Z)V
        intermediary method_25398 Lnet/minecraft/class_4069;method_25398(Z)V
        named setDragging Lnet/minecraft/client/gui/ParentElement;setDragging(Z)V
      • mouseScrolled

        default boolean mouseScrolled​(double mouseX,
                                      double mouseY,
                                      double amount)
        Callback for when a mouse button scroll event has been captured.
        指定者:
        mouseScrolled 在接口中 Element
        参数:
        mouseX - the X coordinate of the mouse
        mouseY - the Y coordinate of the mouse
        amount - value is > 1 if scrolled down, < 1 if scrolled up
        返回:
        true to indicate that the event handling is successful/valid
        另请参阅:
        Mouse.onMouseScroll(long, double, double)
        Mappings:
        Namespace Name Mixin selector
        official a Ldwv;a(DDD)Z
        intermediary method_25401 Lnet/minecraft/class_364;method_25401(DDD)Z
        named mouseScrolled Lnet/minecraft/client/gui/Element;mouseScrolled(DDD)Z
      • keyPressed

        default 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.
        指定者:
        keyPressed 在接口中 Element
        参数:
        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)
        返回:
        true to indicate that the event handling is successful/valid
        另请参阅:
        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 Ldwv;a(III)Z
        intermediary method_25404 Lnet/minecraft/class_364;method_25404(III)Z
        named keyPressed Lnet/minecraft/client/gui/Element;keyPressed(III)Z
      • keyReleased

        default boolean keyReleased​(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.
        指定者:
        keyReleased 在接口中 Element
        参数:
        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)
        返回:
        true to indicate that the event handling is successful/valid
        另请参阅:
        Keyboard.onKey(long, int, int, int, int), GLFW.GLFW_KEY_Q, GLFWKeyCallbackI.invoke(long, int, int, int, int)
        Mappings:
        Namespace Name Mixin selector
        official b Ldwv;b(III)Z
        intermediary method_16803 Lnet/minecraft/class_364;method_16803(III)Z
        named keyReleased Lnet/minecraft/client/gui/Element;keyReleased(III)Z
      • charTyped

        default boolean charTyped​(char chr,
                                  int modifiers)
        Callback for when a character input has been captured. The key code is identified by the constants in GLFW class.
        指定者:
        charTyped 在接口中 Element
        参数:
        chr - the captured character
        modifiers - a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)
        返回:
        true to indicate that the event handling is successful/valid
        另请参阅:
        Keyboard.onChar(long, int, int), GLFW.GLFW_KEY_Q, GLFWKeyCallbackI.invoke(long, int, int, int, int)
        Mappings:
        Namespace Name Mixin selector
        official a Ldwv;a(CI)Z
        intermediary method_25400 Lnet/minecraft/class_364;method_25400(CI)Z
        named charTyped Lnet/minecraft/client/gui/Element;charTyped(CI)Z
      • getFocused

        @Nullable
        @Nullable Element getFocused()
        Mappings:
        Namespace Name Mixin selector
        official aC_ Ldwu;aC_()Ldwv;
        intermediary method_25399 Lnet/minecraft/class_4069;method_25399()Lnet/minecraft/class_364;
        named getFocused Lnet/minecraft/client/gui/ParentElement;getFocused()Lnet/minecraft/client/gui/Element;
      • setFocused

        void setFocused​(@Nullable
                        @Nullable Element focused)
        Mappings:
        Namespace Name Mixin selector
        official a Ldwu;a(Ldwv;)V
        intermediary method_25395 Lnet/minecraft/class_4069;method_25395(Lnet/minecraft/class_364;)V
        named setFocused Lnet/minecraft/client/gui/ParentElement;setFocused(Lnet/minecraft/client/gui/Element;)V
      • setInitialFocus

        default void setInitialFocus​(@Nullable
                                     @Nullable Element element)
        Mappings:
        Namespace Name Mixin selector
        official b Ldwu;b(Ldwv;)V
        intermediary method_20085 Lnet/minecraft/class_4069;method_20085(Lnet/minecraft/class_364;)V
        named setInitialFocus Lnet/minecraft/client/gui/ParentElement;setInitialFocus(Lnet/minecraft/client/gui/Element;)V
      • focusOn

        default void focusOn​(@Nullable
                             @Nullable Element element)
        Mappings:
        Namespace Name Mixin selector
        official c Ldwu;c(Ldwv;)V
        intermediary method_20086 Lnet/minecraft/class_4069;method_20086(Lnet/minecraft/class_364;)V
        named focusOn Lnet/minecraft/client/gui/ParentElement;focusOn(Lnet/minecraft/client/gui/Element;)V
      • changeFocus

        default 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