Interface IAbstractWidgetExtension

All Known Implementing Classes:
AbstractButton, AbstractOptionSliderButton, AbstractScrollWidget, AbstractSliderButton, AbstractStringWidget, AbstractWidget, BeaconScreen.BeaconCancelButton, BeaconScreen.BeaconConfirmButton, BeaconScreen.BeaconPowerButton, BeaconScreen.BeaconScreenButton, BeaconScreen.BeaconSpriteScreenButton, BeaconScreen.BeaconUpgradePowerButton, Button, Checkbox, CycleButton, EditBox, ExtendedButton, ExtendedSlider, FittingMultiLineTextWidget, FocusableTextWidget, GameModeSwitcherScreen.GameModeSlot, ImageButton, ImageWidget, ImageWidget.Sprite, ImageWidget.Texture, LoadingDotsWidget, LockIconButton, MerchantScreen.TradeOfferButton, MultiLineEditBox, MultiLineTextWidget, OptionInstance.OptionInstanceSliderButton, OverlayRecipeComponent.OverlayRecipeButton, OverlayRecipeComponent.OverlaySmeltingRecipeButton, PageButton, PlainTextButton, PlayerSkinWidget, RealmsMainScreen.CrossButton, RealmsMainScreen.NotificationButton, RealmsResetWorldScreen.FrameButton, RealmsSlotOptionsScreen.SettingsSlider, RealmsWorldSlotButton, RecipeBookTabButton, RecipeButton, SpriteIconButton, SpriteIconButton.CenteredIcon, SpriteIconButton.TextAndIcon, StateSwitchingButton, StringWidget, TabButton, TelemetryEventWidget, 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.
     
  • Method Details

    • self

      private 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:
      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