Interface IAbstractWidgetExtension

All Known Implementing Classes:
net.minecraft.client.gui.components.AbstractButton, net.minecraft.client.gui.components.AbstractContainerWidget, net.minecraft.client.gui.components.AbstractScrollArea, net.minecraft.client.gui.components.AbstractSelectionList, net.minecraft.client.gui.components.AbstractSliderButton, AbstractTestScreen.GroupableList, net.minecraft.client.gui.components.AbstractWidget, net.minecraft.client.gui.components.Button, ConfigurationScreen.ConfigurationListScreen.ListLabelWidget, ExtendedButton, ExtendedSlider, LoadingErrorScreen.LoadingEntryList, ModListWidget, ModsButton, net.minecraft.client.gui.components.ObjectSelectionList, UnicodeGlyphButton

public interface IAbstractWidgetExtension
Extension interface for AbstractWidget.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onClick(double mouseX, double mouseY, int button)
    Handles the logic for when this widget is clicked.
    private net.minecraft.client.gui.components.AbstractWidget
     
  • Method Details

    • self

      private net.minecraft.client.gui.components.AbstractWidget self()
    • onClick

      default void onClick(double mouseX, double mouseY, int button)
      Handles the logic for when this widget is clicked. Vanilla calls this after AbstractWidget.mouseClicked(double, double, int) validates that:
      • this widget is active and visible
      • the button can be handled by this widget
      • the mouse
        invalid reference
        is over
        this widget
      Parameters:
      mouseX - the X position of the mouse
      mouseY - the Y position of the mouse
      button - the mouse button being clicked
      See Also:
      • GLFW.GLFW_MOUSE_BUTTON_LEFT
      • GLFW.GLFW_MOUSE_BUTTON_RIGHT
      • GLFW.GLFW_MOUSE_BUTTON_MIDDLE
      • GLFW.GLFW_MOUSE_BUTTON_4