接口 IAbstractWidgetExtension
- 所有已知实现类:
AbstractButton
,AbstractOptionSliderButton
,AbstractScrollWidget
,AbstractSliderButton
,AbstractStringWidget
,AbstractWidget
,AccessibilityOnboardingTextWidget
,BeaconScreen.BeaconCancelButton
,BeaconScreen.BeaconConfirmButton
,BeaconScreen.BeaconPowerButton
,BeaconScreen.BeaconScreenButton
,BeaconScreen.BeaconSpriteScreenButton
,BeaconScreen.BeaconUpgradePowerButton
,Button
,Checkbox
,CycleButton
,EditBox
,ExtendedButton
,FittingMultiLineTextWidget
,ForgeSlider
,GameModeSwitcherScreen.GameModeSlot
,ImageButton
,ImageWidget
,LockIconButton
,MerchantScreen.TradeOfferButton
,MultiLineEditBox
,MultiLineTextWidget
,OptionInstance.OptionInstanceSliderButton
,OverlayRecipeComponent.OverlayRecipeButton
,OverlayRecipeComponent.OverlaySmeltingRecipeButton
,PageButton
,PlainTextButton
,RealmsMainScreen.CloseButton
,RealmsMainScreen.CrossButton
,RealmsMainScreen.NewsButton
,RealmsMainScreen.PendingInvitesButton
,RealmsResetWorldScreen.FrameButton
,RealmsSlotOptionsScreen.SettingsSlider
,RealmsWorldSlotButton
,RecipeBookTabButton
,RecipeButton
,StateSwitchingButton
,StringWidget
,TabButton
,TelemetryEventWidget
,TextAndImageButton
,UnicodeGlyphButton
public interface IAbstractWidgetExtension
Extension interface for
AbstractWidget
.-
方法概要
修饰符和类型方法说明default void
onClick
(double mouseX, double mouseY, int button) Handles the logic for when this widget is clicked.private AbstractWidget
self()
-
方法详细资料
-
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
active
andvisible
- the button
can be handled
by this widget - the mouse
is over
this widget
- 参数:
mouseX
- the X position of the mousemouseY
- the Y position of the mousebutton
- the mouse button being clicked- 另请参阅:
-
GLFW.GLFW_MOUSE_BUTTON_LEFT
GLFW.GLFW_MOUSE_BUTTON_RIGHT
GLFW.GLFW_MOUSE_BUTTON_MIDDLE
GLFW.GLFW_MOUSE_BUTTON_4
- this widget is
-