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
,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
,RealmsLongConfirmationScreen
,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
,ShulkerBoxScreen
,SignEditScreen
,SimpleOption.OptionSliderWidgetImpl
,SimpleOptionsScreen
,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/Element
intermediary net/minecraft/class_364
official fjb
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
charTyped
(char chr, int modifiers) Callback for when a character input has been captured.default @Nullable GuiNavigationPath
default ScreenRect
default @Nullable GuiNavigationPath
getNavigationPath
(GuiNavigation navigation) boolean
default boolean
isMouseOver
(double mouseX, double mouseY) Checks if the mouse position is within the bound of the element.default boolean
keyPressed
(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured.default boolean
keyReleased
(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured.default boolean
mouseClicked
(double mouseX, double mouseY, int button) Callback for when a mouse button down event has been captured.default boolean
mouseDragged
(double mouseX, double mouseY, int button, double deltaX, double deltaY) Callback for when a mouse button drag event has been captured.default void
mouseMoved
(double mouseX, double mouseY) Callback for when a mouse move event has been captured.default boolean
mouseReleased
(double mouseX, double mouseY, int button) Callback for when a mouse button release event has been captured.default boolean
mouseScrolled
(double mouseX, double mouseY, double horizontalAmount, double verticalAmount) Callback for when a mouse button scroll event has been captured.void
setFocused
(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_INTERVAL
Lnet/minecraft/client/gui/Element;MAX_DOUBLE_CLICK_INTERVAL:J
intermediary field_37268
Lnet/minecraft/class_364;field_37268:J
official t
Lfjb;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 mouseMoved
Lnet/minecraft/client/gui/Element;mouseMoved(DD)V
intermediary method_16014
Lnet/minecraft/class_364;method_16014(DD)V
official f
Lfjb;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 inGLFW
class.- Parameters:
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mousebutton
- the mouse button number- Returns:
true
to indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseClicked
Lnet/minecraft/client/gui/Element;mouseClicked(DDI)Z
intermediary method_25402
Lnet/minecraft/class_364;method_25402(DDI)Z
official a
Lfjb;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 inGLFW
class.- Parameters:
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mousebutton
- the mouse button number- Returns:
true
to indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseReleased
Lnet/minecraft/client/gui/Element;mouseReleased(DDI)Z
intermediary method_25406
Lnet/minecraft/class_364;method_25406(DDI)Z
official b
Lfjb;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 inGLFW
class.- 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:
true
to indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseDragged
Lnet/minecraft/client/gui/Element;mouseDragged(DDIDD)Z
intermediary method_25403
Lnet/minecraft/class_364;method_25403(DDIDD)Z
official a
Lfjb;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:
true
to indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named mouseScrolled
Lnet/minecraft/client/gui/Element;mouseScrolled(DDDD)Z
intermediary method_25401
Lnet/minecraft/class_364;method_25401(DDDD)Z
official a
Lfjb;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 inGLFW
class.- Parameters:
keyCode
- the named key code of the event as described in theGLFW
classscanCode
- 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:
true
to indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named keyPressed
Lnet/minecraft/client/gui/Element;keyPressed(III)Z
intermediary method_25404
Lnet/minecraft/class_364;method_25404(III)Z
official a
Lfjb;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 inGLFW
class.- Parameters:
keyCode
- the named key code of the event as described in theGLFW
classscanCode
- 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:
true
to indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named keyReleased
Lnet/minecraft/client/gui/Element;keyReleased(III)Z
intermediary method_16803
Lnet/minecraft/class_364;method_16803(III)Z
official c
Lfjb;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 inGLFW
class.- Parameters:
chr
- the captured charactermodifiers
- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)- Returns:
true
to indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named charTyped
Lnet/minecraft/client/gui/Element;charTyped(CI)Z
intermediary method_25400
Lnet/minecraft/class_364;method_25400(CI)Z
official a
Lfjb;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:
true
if the mouse is within the bound of the element, otherwisefalse
- Mappings:
Namespace Name Mixin selector named isMouseOver
Lnet/minecraft/client/gui/Element;isMouseOver(DD)Z
intermediary method_25405
Lnet/minecraft/class_364;method_25405(DD)Z
official c
Lfjb;c(DD)Z
-
setFocused
void setFocused(boolean focused) - Mappings:
Namespace Name Mixin selector named setFocused
Lnet/minecraft/client/gui/Element;setFocused(Z)V
intermediary method_25365
Lnet/minecraft/class_364;method_25365(Z)V
official a
Lfjb;a(Z)V
-
isFocused
boolean isFocused()- Mappings:
Namespace Name Mixin selector named isFocused
Lnet/minecraft/client/gui/Element;isFocused()Z
intermediary method_25370
Lnet/minecraft/class_364;method_25370()Z
official aH_
Lfjb;aH_()Z
-
getFocusedPath
- Mappings:
Namespace Name Mixin selector named getFocusedPath
Lnet/minecraft/client/gui/Element;getFocusedPath()Lnet/minecraft/client/gui/navigation/GuiNavigationPath;
intermediary method_48218
Lnet/minecraft/class_364;method_48218()Lnet/minecraft/class_8016;
official aI_
Lfjb;aI_()Lfgp;
-