Interface IAbstractWidgetExtension

All Known Implementing Classes:
AbstractButton, AbstractContainerWidget, AbstractOptionSliderButton, AbstractScrollWidget, AbstractSelectionList, AbstractSliderButton, AbstractStringWidget, AbstractTestScreen.GroupableList, AbstractWidget, BeaconScreen.BeaconCancelButton, BeaconScreen.BeaconConfirmButton, BeaconScreen.BeaconPowerButton, BeaconScreen.BeaconScreenButton, BeaconScreen.BeaconSpriteScreenButton, BeaconScreen.BeaconUpgradePowerButton, Button, ChatSelectionScreen.ChatSelectionList, Checkbox, ConfirmExperimentalFeaturesScreen.DetailsScreen.PackList, ContainerObjectSelectionList, CreateBuffetWorldScreen.BiomeList, CreateFlatWorldScreen.DetailsList, CycleButton, EditBox, EditGameRulesScreen.RuleList, ExtendedButton, ExtendedSlider, FittingMultiLineTextWidget, FocusableTextWidget, GameModeSwitcherScreen.GameModeSlot, ImageButton, ImageWidget, ImageWidget.Sprite, ImageWidget.Texture, KeyBindsList, LanguageSelectScreen.LanguageSelectionList, LoadingDotsWidget, LoadingErrorScreen.LoadingEntryList, LockIconButton, MerchantScreen.TradeOfferButton, ModListWidget, ModsButton, MultiLineEditBox, MultiLineTextWidget, ObjectSelectionList, OptionInstance.OptionInstanceSliderButton, OptionsList, OverlayRecipeComponent.OverlayRecipeButton, OverlayRecipeComponent.OverlaySmeltingRecipeButton, PageButton, PlainTextButton, PlayerSkinWidget, PresetFlatWorldScreen.PresetsList, RealmsBackupInfoScreen.BackupInfoList, RealmsBackupScreen.BackupObjectSelectionList, RealmsMainScreen.CrossButton, RealmsMainScreen.NotificationButton, RealmsMainScreen.RealmSelectionList, RealmsObjectSelectionList, RealmsPendingInvitesScreen.PendingInvitationSelectionList, RealmsPlayerScreen.InvitedObjectSelectionList, RealmsResetWorldScreen.FrameButton, RealmsSelectFileToUploadScreen.WorldSelectionList, RealmsSelectWorldTemplateScreen.WorldTemplateList, RealmsSlotOptionsScreen.SettingsSlider, RealmsWorldSlotButton, RecipeBookTabButton, RecipeButton, ReportReasonSelectionScreen.ReasonSelectionList, ServerLinksScreen.LinkList, ServerSelectionList, SocialInteractionsPlayerList, SpriteIconButton, SpriteIconButton.CenteredIcon, SpriteIconButton.TextAndIcon, StateSwitchingButton, StatsScreen.GeneralStatisticsList, StatsScreen.ItemStatisticsList, StatsScreen.MobsStatisticsList, StringWidget, TabButton, TelemetryEventWidget, TransferableSelectionList, UnicodeGlyphButton, WorldSelectionList

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