Interface IAbstractWidgetExtension
- All Known Implementing Classes:
AbstractButton,AbstractContainerWidget,AbstractOptionSliderButton,AbstractScrollArea,AbstractSelectionList,AbstractSliderButton,AbstractStringWidget,AbstractTextAreaWidget,AbstractWidget,BeaconScreen.BeaconCancelButton,BeaconScreen.BeaconConfirmButton,BeaconScreen.BeaconPowerButton,BeaconScreen.BeaconScreenButton,BeaconScreen.BeaconSpriteScreenButton,BeaconScreen.BeaconUpgradePowerButton,Button,ChatSelectionScreen.ChatSelectionList,Checkbox,ConfigurationScreen.ConfigurationListScreen.ListLabelWidget,ConfirmExperimentalFeaturesScreen.DetailsScreen.PackList,ContainerObjectSelectionList,CreateBuffetWorldScreen.BiomeList,CreateFlatWorldScreen.DetailsList,CycleButton,EditBox,EditGameRulesScreen.RuleList,ExtendedButton,ExtendedSlider,FittingMultiLineTextWidget,FocusableTextWidget,GameModeSwitcherScreen.GameModeSlot,ImageButton,ImageWidget,ImageWidget.Sprite,ImageWidget.Texture,InputControlHandlers.NumberRangeHandler.SliderImpl,ItemDisplayWidget,KeyBindsList,LanguageSelectScreen.LanguageSelectionList,LoadingDotsWidget,LoadingErrorScreen.LoadingEntryList,LockIconButton,MerchantScreen.TradeOfferButton,ModListWidget,ModsButton,MultiLineEditBox,MultiLineTextWidget,ObjectSelectionList,OptionInstance.OptionInstanceSliderButton,OptionsList,OverlayRecipeComponent.OverlayCraftingRecipeButton,OverlayRecipeComponent.OverlayRecipeButton,OverlayRecipeComponent.OverlaySmeltingRecipeButton,PageButton,PlainTextButton,PlayerSkinWidget,PresetFlatWorldScreen.PresetsList,RealmsBackupInfoScreen.BackupInfoList,RealmsBackupScreen.BackupObjectSelectionList,RealmsMainScreen.CrossButton,RealmsMainScreen.NotificationButton,RealmsMainScreen.RealmSelectionList,RealmsPendingInvitesScreen.PendingInvitationSelectionList,RealmsPlayersTab.InvitedObjectSelectionList,RealmsPreferredRegionSelectionScreen.RegionSelectionList,RealmsResetWorldScreen.FrameButton,RealmsSelectFileToUploadScreen.WorldSelectionList,RealmsSelectWorldTemplateScreen.WorldTemplateList,RealmsSlotOptionsScreen.SettingsSlider,RealmsWorldSlotButton,RecipeBookTabButton,RecipeButton,ReportReasonSelectionScreen.ReasonSelectionList,ScrollableLayout.Container,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 TypeMethodDescriptiondefault voidonClick(double mouseX, double mouseY, int button) Handles the logic for when this widget is clicked.private AbstractWidgetself()
-
Method Details
-
self
-
onClick
default void onClick(double mouseX, double mouseY, int button) Handles the logic for when this widget is clicked. Vanilla calls this afterAbstractWidget.mouseClicked(double, double, int)validates that:- this widget is
activeandvisible - the button
can be handledby this widget - the mouse
this widget
invalid reference
is over
- Parameters:
mouseX- the X position of the mousemouseY- the Y position of the mousebutton- the mouse button being clicked- See Also:
- this widget is
-