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 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
is overthis widget
- Parameters:
mouseX- the X position of the mousemouseY- the Y position of the mousebutton- the mouse button being clicked- See Also:
-
GLFW.GLFW_MOUSE_BUTTON_LEFTGLFW.GLFW_MOUSE_BUTTON_RIGHTGLFW.GLFW_MOUSE_BUTTON_MIDDLEGLFW.GLFW_MOUSE_BUTTON_4
- this widget is
-