接口 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.
     
  • 方法详细资料

    • 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:
      参数:
      mouseX - the X position of the mouse
      mouseY - the Y position of the mouse
      button - 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