Package net.minecraft.client.gui
Interface Element
- All Superinterfaces:
Navigable
- All Known Subinterfaces:
ParentElement
- All Known Implementing Classes:
AbstractCommandBlockScreen,AbstractCraftingRecipeBookWidget,AbstractFurnaceRecipeBookWidget,AbstractFurnaceScreen,AbstractParentElement,AbstractSignEditScreen,AbstractTextWidget,AbuseReportReasonScreen,AbuseReportReasonScreen.ReasonListWidget,AbuseReportReasonScreen.ReasonListWidget.ReasonEntry,AbuseReportTypeScreen,AccessibilityOnboardingScreen,AccessibilityOptionsScreen,AddServerScreen,AdvancementsScreen,AlwaysSelectedEntryListWidget,AlwaysSelectedEntryListWidget.Entry,AnimatedResultButton,AnvilScreen,BackupPromptScreen,BeaconScreen,BeaconScreen.BaseButtonWidget,BeaconScreen.CancelButtonWidget,BeaconScreen.DoneButtonWidget,BeaconScreen.EffectButtonWidget,BeaconScreen.IconButtonWidget,BeaconScreen.LevelTwoEffectButtonWidget,BlastFurnaceScreen,BookEditScreen,BookScreen,BookSigningScreen,BrewingStandScreen,ButtonWidget,BuyRealmsScreen,CartographyTableScreen,ChatOptionsScreen,ChatReportScreen,ChatScreen,ChatSelectionScreen,ChatSelectionScreen.SelectionListWidget,ChatSelectionScreen.SelectionListWidget.Entry,ChatSelectionScreen.SelectionListWidget.MessageEntry,ChatSelectionScreen.SelectionListWidget.SenderEntry,ChatSelectionScreen.SelectionListWidget.SeparatorEntry,ChatSelectionScreen.SelectionListWidget.TextEntry,CheckboxWidget,ClickableWidget,ClientCommonNetworkHandler.ConfirmServerResourcePackScreen,CodeOfConductScreen,ColumnsDialogScreen,CommandBlockScreen,ConfirmLinkScreen,ConfirmScreen,ConnectScreen,ContainerWidget,ControlsListWidget,ControlsListWidget.CategoryEntry,ControlsListWidget.Entry,ControlsListWidget.KeyBindingEntry,ControlsOptionsScreen,CrafterScreen,CraftingScreen,CreateWorldScreen,CreativeInventoryScreen,CreditsAndAttributionScreen,CreditsScreen,CustomizeBuffetLevelScreen,CustomizeBuffetLevelScreen.BuffetBiomesListWidget,CustomizeBuffetLevelScreen.BuffetBiomesListWidget.BuffetBiomeItem,CustomizeFlatLevelScreen,CustomizeFlatLevelScreen.SuperflatLayersListWidget,CustomizeFlatLevelScreen.SuperflatLayersListWidget.Entry,CustomizeFlatLevelScreen.SuperflatLayersListWidget.HeaderEntry,CustomizeFlatLevelScreen.SuperflatLayersListWidget.SuperflatLayerEntry,CyclingButtonWidget,DataPackFailureScreen,DeathScreen,DeathScreen.TitleScreenConfirmScreen,DebugOptionsScreen,DebugOptionsScreen.AbstractEntry,DebugOptionsScreen.Category,DebugOptionsScreen.Entry,DebugOptionsScreen.OptionsListWidget,DemoScreen,DialogListDialogScreen,DialogScreen,DialogScreen.WarningScreen,DirectConnectScreen,DisconnectedScreen,EditBoxWidget,EditGameRulesScreen,EditGameRulesScreen.AbstractRuleWidget,EditGameRulesScreen.BooleanRuleWidget,EditGameRulesScreen.IntRuleWidget,EditGameRulesScreen.NamedRuleWidget,EditGameRulesScreen.RuleCategoryWidget,EditGameRulesScreen.RuleListWidget,EditWorldScreen,ElementListWidget,ElementListWidget.Entry,EnchantmentScreen,EntryListWidget,EntryListWidget.Entry,ExperimentalWarningScreen,ExperimentalWarningScreen.DetailsScreen,ExperimentalWarningScreen.DetailsScreen.PackListWidget,ExperimentalWarningScreen.DetailsScreen.PackListWidgetEntry,ExperimentsScreen,FatalErrorScreen,FontOptionsScreen,ForgingScreen,FurnaceScreen,GameMenuScreen,GameMenuScreen.FeedbackScreen,GameModeSwitcherScreen,GameModeSwitcherScreen.ButtonWidget,GameOptionsScreen,Generic3x3ContainerScreen,GenericContainerScreen,GraphicsWarningScreen,GrindstoneScreen,HandledScreen,HangingSignEditScreen,HopperScreen,HorseScreen,IconWidget,IconWidget.Simple,IconWidget.Texture,InputControlHandlers.NumberRangeInputControlHandler.RangeSliderWidget,InventoryScreen,ItemStackWidget,JigsawBlockScreen,KeybindsScreen,LanguageOptionsScreen,LanguageOptionsScreen.LanguageSelectionListWidget,LanguageOptionsScreen.LanguageSelectionListWidget.LanguageEntry,LecternScreen,LevelLoadingScreen,LoadingWidget,LockButtonWidget,LoomScreen,MerchantScreen,MerchantScreen.WidgetButtonPage,MessageScreen,MinecartCommandBlockScreen,MouseOptionsScreen,MultiActionDialogScreen,MultilineTextWidget,MultiplayerScreen,MultiplayerServerListWidget,MultiplayerServerListWidget.Entry,MultiplayerServerListWidget.LanServerEntry,MultiplayerServerListWidget.ScanningEntry,MultiplayerServerListWidget.ServerEntry,MultiplayerWarningScreen,NarratedMultilineTextWidget,NoticeScreen,OnlineOptionsScreen,OpenToLanScreen,OptimizeWorldScreen,OptionListWidget,OptionListWidget.OptionWidgetEntry,OptionListWidget.WidgetEntry,OptionSliderWidget,OptionsScreen,OutOfMemoryScreen,PackListWidget,PackListWidget.Entry,PackListWidget.HeaderEntry,PackListWidget.ResourcePackEntry,PackScreen,PageTurnWidget,PlayerSkinWidget,PopupScreen,PresetsScreen,PresetsScreen.SuperflatPresetsListWidget,PresetsScreen.SuperflatPresetsListWidget.SuperflatPresetEntry,PressableTextWidget,PressableWidget,ProgressScreen,RealmsBackupInfoScreen,RealmsBackupInfoScreen.BackupInfoList,RealmsBackupInfoScreen.BackupInfoListEntry,RealmsBackupScreen,RealmsBackupScreen.BackupObjectSelectionList,RealmsBackupScreen.BackupObjectSelectionListEntry,RealmsBrokenWorldScreen,RealmsClientIncompatibleScreen,RealmsConfigureWorldScreen,RealmsConfirmScreen,RealmsConnectingScreen,RealmsCreateRealmScreen,RealmsCreateWorldScreen,RealmsCreateWorldScreen.FrameButton,RealmsDownloadLatestWorldScreen,RealmsGenericErrorScreen,RealmsInviteScreen,RealmsLongRunningMcoTaskScreen,RealmsMainScreen,RealmsMainScreen.CrossButton,RealmsMainScreen.Entry,RealmsMainScreen.NotificationButtonWidget,RealmsMainScreen.ParentRealmSelectionListEntry,RealmsMainScreen.RealmSelectionList,RealmsMainScreen.RealmSelectionListEntry,RealmsMainScreen.SnapshotEntry,RealmsMainScreen.VisitUrlNotification,RealmsNotificationsScreen,RealmsParentalConsentScreen,RealmsPendingInvitesScreen,RealmsPendingInvitesScreen.PendingInvitationSelectionList,RealmsPendingInvitesScreen.PendingInvitationSelectionListEntry,RealmsPlayerTab.HeaderEntry,RealmsPlayerTab.InvitedObjectSelectionList,RealmsPlayerTab.InvitedObjectSelectionListEntry,RealmsPlayerTab.PlayerTabEntry,RealmsRegionPreferenceScreen,RealmsRegionPreferenceScreen.RegionListWidget,RealmsRegionPreferenceScreen.RegionListWidget.RegionEntry,RealmsScreen,RealmsSelectFileToUploadScreen,RealmsSelectWorldTemplateScreen,RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionList,RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionListEntry,RealmsSlotOptionsScreen,RealmsSlotOptionsScreen.SettingsSlider,RealmsTermsScreen,RealmsUploadScreen,RealmsWorldSlotButton,RecipeAlternativesWidget,RecipeAlternativesWidget.AlternativeButtonWidget,RecipeAlternativesWidget.CraftingAlternativeButtonWidget,RecipeAlternativesWidget.FurnaceAlternativeButtonWidget,RecipeBookScreen,RecipeBookWidget,RecipeGroupButtonWidget,ReconfiguringScreen,RecoverWorldScreen,ReportScreen,ReportScreen.DiscardWarningScreen,Screen,ScrollableLayoutWidget.Container,ScrollableTextFieldWidget,ScrollableTextWidget,ScrollableWidget,SelectWorldScreen,ServerLinksDialogScreen,ShulkerBoxScreen,SignEditScreen,SimpleDialogScreen,SimpleOption.OptionSliderWidgetImpl,SkinOptionsScreen,SkinReportScreen,SleepingChatScreen,SliderWidget,SmithingScreen,SmokerScreen,SocialInteractionsPlayerListEntry,SocialInteractionsPlayerListWidget,SocialInteractionsScreen,SoundOptionsScreen,StatsScreen,StatsScreen.EntityStatsListWidget,StatsScreen.EntityStatsListWidget.Entry,StatsScreen.GeneralStatsListWidget,StatsScreen.GeneralStatsListWidget.Entry,StatsScreen.ItemStatsListWidget,StatsScreen.ItemStatsListWidget.Entry,StatsScreen.ItemStatsListWidget.Header,StatsScreen.ItemStatsListWidget.Header.HeaderButton,StatsScreen.ItemStatsListWidget.StatEntry,StatsScreen.ItemStatsListWidget.StatEntry.ItemStackInSlotWidget,StonecutterScreen,StructureBlockScreen,SymlinkWarningScreen,TabButtonWidget,TabNavigationWidget,TaskScreen,TelemetryEventWidget,TelemetryInfoScreen,TestBlockScreen,TestInstanceBlockScreen,TextFieldWidget,TextIconButtonWidget,TextIconButtonWidget.IconOnly,TextIconButtonWidget.WithText,TexturedButtonWidget,TextWidget,TitleScreen,ToggleButtonWidget,UsernameReportScreen,VideoOptionsScreen,WaitingForResponseScreen,WarningScreen,WorldListWidget,WorldListWidget.EmptyListEntry,WorldListWidget.Entry,WorldListWidget.LoadingEntry,WorldListWidget.WorldEntry
Base GUI interface for handling callbacks related to
keyboard or mouse actions.
Mouse coordinate is bounded by the size of the window in
pixels.
- Mappings:
Namespace Name named net/minecraft/client/gui/Elementintermediary net/minecraft/class_364official ggw
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanCallback for when a character input has been captured.default ScreenRectgetBorder(NavigationDirection direction) default @Nullable GuiNavigationPathdefault ScreenRectdefault @Nullable GuiNavigationPathgetNavigationPath(GuiNavigation navigation) default booleanbooleandefault booleanisMouseOver(double mouseX, double mouseY) Checks if the mouse position is within the bound of the element.default booleankeyPressed(KeyInput input) Callback for when a key down event has been captured.default booleankeyReleased(KeyInput input) Callback for when a key down event has been captured.default booleanmouseClicked(Click click, boolean doubled) Callback for when a mouse button down event has been captured.default booleanmouseDragged(Click click, double offsetX, double offsetY) Callback for when a mouse button drag event has been captured.default voidmouseMoved(double mouseX, double mouseY) Callback for when a mouse move event has been captured.default booleanmouseReleased(Click click) Callback for when a mouse button release event has been captured.default booleanmouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) Callback for when a mouse button scroll event has been captured.voidsetFocused(boolean focused) Methods inherited from interface net.minecraft.client.gui.navigation.Navigable
getNavigationOrder
-
Method Details
-
mouseMoved
default void mouseMoved(double mouseX, double mouseY) Callback for when a mouse move event has been captured.- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mouse- See Also:
- Mappings:
Namespace Name Mixin selector named mouseMovedLnet/minecraft/client/gui/Element;mouseMoved(DD)Vintermediary method_16014Lnet/minecraft/class_364;method_16014(DD)Vofficial dLggw;d(DD)V
-
mouseClicked
Callback for when a mouse button down event has been captured. The button number is identified by the constants inGLFWclass.- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseClickedLnet/minecraft/client/gui/Element;mouseClicked(Lnet/minecraft/client/gui/Click;Z)Zintermediary method_25402Lnet/minecraft/class_364;method_25402(Lnet/minecraft/class_11909;Z)Zofficial aLggw;a(Lgti;Z)Z
-
mouseReleased
Callback for when a mouse button release event has been captured. The button number is identified by the constants inGLFWclass.- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseReleasedLnet/minecraft/client/gui/Element;mouseReleased(Lnet/minecraft/client/gui/Click;)Zintermediary method_25406Lnet/minecraft/class_364;method_25406(Lnet/minecraft/class_11909;)Zofficial aLggw;a(Lgti;)Z
-
mouseDragged
Callback for when a mouse button drag event has been captured. The button number is identified by the constants inGLFWclass.- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseDraggedLnet/minecraft/client/gui/Element;mouseDragged(Lnet/minecraft/client/gui/Click;DD)Zintermediary method_25403Lnet/minecraft/class_364;method_25403(Lnet/minecraft/class_11909;DD)Zofficial aLggw;a(Lgti;DD)Z
-
mouseScrolled
default boolean mouseScrolled(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) Callback for when a mouse button scroll event has been captured.- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousehorizontalAmount- the horizontal scroll amountverticalAmount- the vertical scroll amount- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseScrolledLnet/minecraft/client/gui/Element;mouseScrolled(DDDD)Zintermediary method_25401Lnet/minecraft/class_364;method_25401(DDDD)Zofficial aLggw;a(DDDD)Z
-
keyPressed
Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named keyPressedLnet/minecraft/client/gui/Element;keyPressed(Lnet/minecraft/client/input/KeyInput;)Zintermediary method_25404Lnet/minecraft/class_364;method_25404(Lnet/minecraft/class_11908;)Zofficial aLggw;a(Lgth;)Z
-
keyReleased
Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named keyReleasedLnet/minecraft/client/gui/Element;keyReleased(Lnet/minecraft/client/input/KeyInput;)Zintermediary method_16803Lnet/minecraft/class_364;method_16803(Lnet/minecraft/class_11908;)Zofficial bLggw;b(Lgth;)Z
-
charTyped
Callback for when a character input has been captured. The key code is identified by the constants inGLFWclass.- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named charTypedLnet/minecraft/client/gui/Element;charTyped(Lnet/minecraft/client/input/CharInput;)Zintermediary method_25400Lnet/minecraft/class_364;method_25400(Lnet/minecraft/class_11905;)Zofficial aLggw;a(Lgte;)Z
-
isMouseOver
default boolean isMouseOver(double mouseX, double mouseY) Checks if the mouse position is within the bound of the element.- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mouse- Returns:
trueif the mouse is within the bound of the element, otherwisefalse- Mappings:
Namespace Name Mixin selector named isMouseOverLnet/minecraft/client/gui/Element;isMouseOver(DD)Zintermediary method_25405Lnet/minecraft/class_364;method_25405(DD)Zofficial a_Lggw;a_(DD)Z
-
setFocused
void setFocused(boolean focused) - Mappings:
Namespace Name Mixin selector named setFocusedLnet/minecraft/client/gui/Element;setFocused(Z)Vintermediary method_25365Lnet/minecraft/class_364;method_25365(Z)Vofficial bLggw;b(Z)V
-
isFocused
boolean isFocused()- Mappings:
Namespace Name Mixin selector named isFocusedLnet/minecraft/client/gui/Element;isFocused()Zintermediary method_25370Lnet/minecraft/class_364;method_25370()Zofficial aP_Lggw;aP_()Z
-
isClickable
default boolean isClickable()- Mappings:
Namespace Name Mixin selector named isClickableLnet/minecraft/client/gui/Element;isClickable()Zintermediary method_72784Lnet/minecraft/class_364;method_72784()Zofficial GLggw;G()Z
-
getFocusedPath
- Mappings:
Namespace Name Mixin selector named getFocusedPathLnet/minecraft/client/gui/Element;getFocusedPath()Lnet/minecraft/client/gui/navigation/GuiNavigationPath;intermediary method_48218Lnet/minecraft/class_364;method_48218()Lnet/minecraft/class_8016;official aQ_Lggw;aQ_()Lgcz;
-