Package net.minecraft.client.gui
Interface Element
- All Superinterfaces:
Navigable
- All Known Subinterfaces:
ParentElement
- All Known Implementing Classes:
AbstractCommandBlockScreen,AbstractFurnaceRecipeBookScreen,AbstractFurnaceScreen,AbstractInventoryScreen,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,BlastFurnaceRecipeBookScreen,BlastFurnaceScreen,BookEditScreen,BookScreen,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,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.SuperflatLayerEntry,CyclingButtonWidget,DataPackFailureScreen,DeathScreen,DeathScreen.TitleScreenConfirmScreen,DemoScreen,DialogScreen,DirectConnectScreen,DisconnectedRealmsScreen,DisconnectedScreen,DownloadingTerrainScreen,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,FurnaceRecipeBookScreen,FurnaceScreen,GameMenuScreen,GameMenuScreen.FeedbackScreen,GameModeSelectionScreen,GameModeSelectionScreen.ButtonWidget,GameOptionsScreen,Generic3x3ContainerScreen,GenericContainerScreen,GrindstoneScreen,HandledScreen,HangingSignEditScreen,HopperScreen,HorseScreen,IconWidget,IconWidget.Simple,IconWidget.Texture,InventoryScreen,JigsawBlockScreen,KeybindsScreen,LanguageOptionsScreen,LanguageOptionsScreen.LanguageSelectionListWidget,LanguageOptionsScreen.LanguageSelectionListWidget.LanguageEntry,LecternScreen,LevelLoadingScreen,LockButtonWidget,LoomScreen,MerchantScreen,MerchantScreen.WidgetButtonPage,MessageScreen,MinecartCommandBlockScreen,MouseOptionsScreen,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.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,RealmsCreateRealmScreen,RealmsCreateWorldScreen,RealmsCreateWorldScreen.FrameButton,RealmsDownloadLatestWorldScreen,RealmsGenericErrorScreen,RealmsInviteScreen,RealmsLoadingWidget,RealmsLongRunningMcoTaskScreen,RealmsLongRunningTickableTaskScreen,RealmsMainScreen,RealmsMainScreen.CrossButton,RealmsMainScreen.EmptyEntry,RealmsMainScreen.Entry,RealmsMainScreen.NotificationButtonWidget,RealmsMainScreen.ParentRealmSelectionListEntry,RealmsMainScreen.RealmSelectionList,RealmsMainScreen.RealmSelectionListEntry,RealmsMainScreen.SnapshotEntry,RealmsMainScreen.VisitButtonEntry,RealmsMainScreen.VisitUrlNotification,RealmsNotificationsScreen,RealmsObjectSelectionList,RealmsParentalConsentScreen,RealmsPendingInvitesScreen,RealmsPendingInvitesScreen.PendingInvitationSelectionList,RealmsPendingInvitesScreen.PendingInvitationSelectionListEntry,RealmsPlayerScreen,RealmsPlayerScreen.InvitedObjectSelectionList,RealmsPlayerScreen.InvitedObjectSelectionListEntry,RealmsResetNormalWorldScreen,RealmsScreen,RealmsSelectFileToUploadScreen,RealmsSelectFileToUploadScreen.WorldListEntry,RealmsSelectFileToUploadScreen.WorldSelectionList,RealmsSelectWorldTemplateScreen,RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionList,RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionListEntry,RealmsSettingsScreen,RealmsSlotOptionsScreen,RealmsSlotOptionsScreen.SettingsSlider,RealmsSubscriptionInfoScreen,RealmsTermsScreen,RealmsUploadScreen,RealmsWorldSlotButton,RecipeAlternativesWidget,RecipeAlternativesWidget.AlternativeButtonWidget,RecipeAlternativesWidget.FurnaceAlternativeButtonWidget,RecipeBookWidget,RecipeGroupButtonWidget,ReconfiguringScreen,RecoverWorldScreen,ReportScreen,ReportScreen.DiscardWarningScreen,Screen,ScrollableTextWidget,ScrollableWidget,SelectWorldScreen,ServerLinksScreen,ServerLinksScreen.LinksListEntry,ServerLinksScreen.LinksListWidget,ShulkerBoxScreen,SignEditScreen,SimpleOption.OptionSliderWidgetImpl,SkinOptionsScreen,SkinReportScreen,SleepingChatScreen,SliderWidget,SmithingScreen,SmokerRecipeBookScreen,SmokerScreen,SocialInteractionsPlayerListEntry,SocialInteractionsPlayerListWidget,SocialInteractionsScreen,SoundOptionsScreen,StatsScreen,StatsScreen.EntityStatsListWidget,StatsScreen.EntityStatsListWidget.Entry,StatsScreen.GeneralStatsListWidget,StatsScreen.GeneralStatsListWidget.Entry,StatsScreen.ItemStatsListWidget,StatsScreen.ItemStatsListWidget.Entry,StonecutterScreen,StructureBlockScreen,SymlinkWarningScreen,TabButtonWidget,TabNavigationWidget,TaskScreen,TelemetryEventWidget,TelemetryInfoScreen,TextFieldWidget,TextIconButtonWidget,TextIconButtonWidget.IconOnly,TextIconButtonWidget.WithText,TexturedButtonWidget,TextWidget,TitleScreen,ToggleButtonWidget,UsernameReportScreen,VideoOptionsScreen,WarningScreen,WorldListWidget,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 fki
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancharTyped(char chr, int modifiers) Callback for when a character input has been captured.default @Nullable GuiNavigationPathdefault ScreenRectdefault @Nullable GuiNavigationPathgetNavigationPath(GuiNavigation navigation) booleandefault booleanisMouseOver(double mouseX, double mouseY) Checks if the mouse position is within the bound of the element.default booleankeyPressed(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured.default booleankeyReleased(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured.default booleanmouseClicked(double mouseX, double mouseY, int button) Callback for when a mouse button down event has been captured.default booleanmouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) 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(double mouseX, double mouseY, int button) 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
-
Field Details
-
MAX_DOUBLE_CLICK_INTERVAL
static final long MAX_DOUBLE_CLICK_INTERVAL- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_DOUBLE_CLICK_INTERVALLnet/minecraft/client/gui/Element;MAX_DOUBLE_CLICK_INTERVAL:Jintermediary field_37268Lnet/minecraft/class_364;field_37268:Jofficial tLfki;t:J
-
-
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 fLfki;f(DD)V
-
mouseClicked
default boolean mouseClicked(double mouseX, double mouseY, int button) Callback for when a mouse button down event has been captured. The button number is identified by the constants inGLFWclass.- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousebutton- the mouse button number- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseClickedLnet/minecraft/client/gui/Element;mouseClicked(DDI)Zintermediary method_25402Lnet/minecraft/class_364;method_25402(DDI)Zofficial aLfki;a(DDI)Z
-
mouseReleased
default boolean mouseReleased(double mouseX, double mouseY, int button) Callback for when a mouse button release event has been captured. The button number is identified by the constants inGLFWclass.- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousebutton- the mouse button number- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseReleasedLnet/minecraft/client/gui/Element;mouseReleased(DDI)Zintermediary method_25406Lnet/minecraft/class_364;method_25406(DDI)Zofficial bLfki;b(DDI)Z
-
mouseDragged
default boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY) Callback for when a mouse button drag event has been captured. The button number is identified by the constants inGLFWclass.- Parameters:
mouseX- the current X coordinate of the mousemouseY- the current Y coordinate of the mousebutton- the mouse button numberdeltaX- the difference of the current X with the previous X coordinatedeltaY- the difference of the current Y with the previous Y coordinate- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseDraggedLnet/minecraft/client/gui/Element;mouseDragged(DDIDD)Zintermediary method_25403Lnet/minecraft/class_364;method_25403(DDIDD)Zofficial aLfki;a(DDIDD)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 aLfki;a(DDDD)Z
-
keyPressed
default boolean keyPressed(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Parameters:
keyCode- the named key code of the event as described in theGLFWclassscanCode- the unique/platform-specific scan code of the keyboard inputmodifiers- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named keyPressedLnet/minecraft/client/gui/Element;keyPressed(III)Zintermediary method_25404Lnet/minecraft/class_364;method_25404(III)Zofficial aLfki;a(III)Z
-
keyReleased
default boolean keyReleased(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Parameters:
keyCode- the named key code of the event as described in theGLFWclassscanCode- the unique/platform-specific scan code of the keyboard inputmodifiers- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named keyReleasedLnet/minecraft/client/gui/Element;keyReleased(III)Zintermediary method_16803Lnet/minecraft/class_364;method_16803(III)Zofficial cLfki;c(III)Z
-
charTyped
default boolean charTyped(char chr, int modifiers) Callback for when a character input has been captured. The key code is identified by the constants inGLFWclass.- Parameters:
chr- the captured charactermodifiers- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named charTypedLnet/minecraft/client/gui/Element;charTyped(CI)Zintermediary method_25400Lnet/minecraft/class_364;method_25400(CI)Zofficial aLfki;a(CI)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 cLfki;c(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 aLfki;a(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 aO_Lfki;aO_()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 aP_Lfki;aP_()Lfhw;
-