Package net.minecraft.client.gui
Interface ParentElement
- All Known Implementing Classes:
AbstractCommandBlockScreen,AbstractFurnaceScreen,AbstractInventoryScreen,AbstractParentElement,AbstractSignEditScreen,AbuseReportReasonScreen,AbuseReportReasonScreen.ReasonListWidget,AccessibilityOnboardingScreen,AccessibilityOptionsScreen,AddServerScreen,AdvancementsScreen,AlwaysSelectedEntryListWidget,AnvilScreen,BackupPromptScreen,BeaconScreen,BlastFurnaceScreen,BookEditScreen,BookScreen,BrewingStandScreen,CartographyTableScreen,ChatOptionsScreen,ChatReportScreen,ChatReportScreen.DiscardWarningScreen,ChatScreen,ChatSelectionScreen,ChatSelectionScreen.SelectionListWidget,CommandBlockScreen,ConfirmLinkScreen,ConfirmScreen,ConnectScreen,ControlsListWidget,ControlsListWidget.CategoryEntry,ControlsListWidget.Entry,ControlsListWidget.KeyBindingEntry,ControlsOptionsScreen,CraftingScreen,CreateWorldScreen,CreativeInventoryScreen,CreditsAndAttributionScreen,CreditsScreen,CustomizeBuffetLevelScreen,CustomizeBuffetLevelScreen.BuffetBiomesListWidget,CustomizeFlatLevelScreen,CustomizeFlatLevelScreen.SuperflatLayersListWidget,DatapackFailureScreen,DeathScreen,DeathScreen.TitleScreenConfirmScreen,DemoScreen,DialogScreen,DirectConnectScreen,DisconnectedRealmsScreen,DisconnectedScreen,DownloadingTerrainScreen,EditGameRulesScreen,EditGameRulesScreen.AbstractRuleWidget,EditGameRulesScreen.BooleanRuleWidget,EditGameRulesScreen.IntRuleWidget,EditGameRulesScreen.NamedRuleWidget,EditGameRulesScreen.RuleCategoryWidget,EditGameRulesScreen.RuleListWidget,EditWorldScreen,ElementListWidget,ElementListWidget.Entry,EnchantmentScreen,EntryListWidget,ExperimentalWarningScreen,ExperimentalWarningScreen.DetailsScreen,ExperimentalWarningScreen.DetailsScreen.PackListWidget,ExperimentsScreen,FatalErrorScreen,ForgingScreen,FurnaceScreen,GameMenuScreen,GameModeSelectionScreen,GameOptionsScreen,Generic3x3ContainerScreen,GenericContainerScreen,GrindstoneScreen,HandledScreen,HangingSignEditScreen,HopperScreen,HorseScreen,InventoryScreen,JigsawBlockScreen,KeybindsScreen,LanguageOptionsScreen,LanguageOptionsScreen.LanguageSelectionListWidget,LecternScreen,LevelLoadingScreen,LoomScreen,MerchantScreen,MessageScreen,MinecartCommandBlockScreen,MouseOptionsScreen,MultiplayerScreen,MultiplayerServerListWidget,MultiplayerWarningScreen,NoticeScreen,OnlineOptionsScreen,OpenToLanScreen,OptimizeWorldScreen,OptionListWidget,OptionListWidget.WidgetEntry,OptionsScreen,OutOfMemoryScreen,PackListWidget,PackScreen,PresetsScreen,PresetsScreen.SuperflatPresetsListWidget,ProgressScreen,Realms32BitWarningScreen,RealmsBackupInfoScreen,RealmsBackupInfoScreen.BackupInfoList,RealmsBackupScreen,RealmsBackupScreen.BackupObjectSelectionList,RealmsBrokenWorldScreen,RealmsClientOutdatedScreen,RealmsConfigureWorldScreen,RealmsConfirmScreen,RealmsCreateRealmScreen,RealmsDownloadLatestWorldScreen,RealmsGenericErrorScreen,RealmsInviteScreen,RealmsLongConfirmationScreen,RealmsLongRunningMcoTaskScreen,RealmsMainScreen,RealmsMainScreen.RealmSelectionList,RealmsNotificationsScreen,RealmsObjectSelectionList,RealmsParentalConsentScreen,RealmsPendingInvitesScreen,RealmsPendingInvitesScreen.PendingInvitationSelectionList,RealmsPlayerScreen,RealmsPlayerScreen.InvitedObjectSelectionList,RealmsResetNormalWorldScreen,RealmsResetWorldScreen,RealmsScreen,RealmsSelectFileToUploadScreen,RealmsSelectFileToUploadScreen.WorldSelectionList,RealmsSelectWorldTemplateScreen,RealmsSelectWorldTemplateScreen.WorldTemplateObjectSelectionList,RealmsSettingsScreen,RealmsSlotOptionsScreen,RealmsSubscriptionInfoScreen,RealmsTermsScreen,RealmsUploadScreen,Screen,SelectWorldScreen,ShulkerBoxScreen,SignEditScreen,SimpleOptionsScreen,SkinOptionsScreen,SleepingChatScreen,SmithingScreen,SmokerScreen,SocialInteractionsPlayerListEntry,SocialInteractionsPlayerListWidget,SocialInteractionsScreen,SoundOptionsScreen,StatsScreen,StatsScreen.EntityStatsListWidget,StatsScreen.GeneralStatsListWidget,StatsScreen.ItemStatsListWidget,StonecutterScreen,StructureBlockScreen,TabNavigationWidget,TaskScreen,TelemetryInfoScreen,TitleScreen,VideoOptionsScreen,WarningScreen,WorldListWidget
A GUI interface which handles keyboard and mouse callbacks for child GUI elements.
The implementation of a parent element can decide whether a child element receives keyboard and mouse callbacks.
- Mappings:
Namespace Name official eqjintermediary net/minecraft/class_4069named net/minecraft/client/gui/ParentElement
-
Field Summary
Fields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancharTyped(char chr, int modifiers) Callback for when a character input has been captured.children()Gets a list of all child GUI elements.private @Nullable GuiNavigationPathcomputeChildPath(ScreenRect focus, NavigationDirection direction, @Nullable Element focused, GuiNavigation navigation) private @Nullable GuiNavigationPathcomputeInitialChildPath(ScreenRect focus, NavigationDirection direction, @Nullable Element focused, GuiNavigation navigation) private @Nullable GuiNavigationPathcomputeNavigationPath(GuiNavigation.Arrow navigation) private @Nullable GuiNavigationPathcomputeNavigationPath(GuiNavigation.Tab navigation) default voiddefault @Nullable GuiNavigationPathdefault @Nullable GuiNavigationPathgetNavigationPath(GuiNavigation navigation) hoveredElement(double mouseX, double mouseY) booleandefault booleandefault 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 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 amount) Callback for when a mouse button scroll event has been captured.voidsetDragging(boolean dragging) default voidsetFocused(boolean focused) voidsetFocused(@Nullable Element focused) Methods inherited from interface net.minecraft.client.gui.Element
getNavigationFocus, isMouseOver, mouseMovedMethods inherited from interface net.minecraft.client.gui.navigation.Navigable
getNavigationOrder
-
Method Details
-
children
Gets a list of all child GUI elements.- Mappings:
Namespace Name Mixin selector official iLeqj;i()Ljava/util/List;intermediary method_25396Lnet/minecraft/class_4069;method_25396()Ljava/util/List;named childrenLnet/minecraft/client/gui/ParentElement;children()Ljava/util/List;
-
hoveredElement
- Mappings:
Namespace Name Mixin selector official dLeqj;d(DD)Ljava/util/Optional;intermediary method_19355Lnet/minecraft/class_4069;method_19355(DD)Ljava/util/Optional;named hoveredElementLnet/minecraft/client/gui/ParentElement;hoveredElement(DD)Ljava/util/Optional;
-
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.- Specified by:
mouseClickedin interfaceElement- 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 official aLeqk;a(DDI)Zintermediary method_25402Lnet/minecraft/class_364;method_25402(DDI)Znamed mouseClickedLnet/minecraft/client/gui/Element;mouseClicked(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.- Specified by:
mouseReleasedin interfaceElement- 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 official bLeqk;b(DDI)Zintermediary method_25406Lnet/minecraft/class_364;method_25406(DDI)Znamed mouseReleasedLnet/minecraft/client/gui/Element;mouseReleased(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.- Specified by:
mouseDraggedin interfaceElement- 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 official aLeqk;a(DDIDD)Zintermediary method_25403Lnet/minecraft/class_364;method_25403(DDIDD)Znamed mouseDraggedLnet/minecraft/client/gui/Element;mouseDragged(DDIDD)Z
-
isDragging
boolean isDragging()- Mappings:
Namespace Name Mixin selector official aA_Leqj;aA_()Zintermediary method_25397Lnet/minecraft/class_4069;method_25397()Znamed isDraggingLnet/minecraft/client/gui/ParentElement;isDragging()Z
-
setDragging
void setDragging(boolean dragging) - Mappings:
Namespace Name Mixin selector official c_Leqj;c_(Z)Vintermediary method_25398Lnet/minecraft/class_4069;method_25398(Z)Vnamed setDraggingLnet/minecraft/client/gui/ParentElement;setDragging(Z)V
-
mouseScrolled
default boolean mouseScrolled(double mouseX, double mouseY, double amount) Callback for when a mouse button scroll event has been captured.- Specified by:
mouseScrolledin interfaceElement- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mouseamount- value is< 0if scrolled down,> 0if scrolled up- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector official aLeqk;a(DDD)Zintermediary method_25401Lnet/minecraft/class_364;method_25401(DDD)Znamed mouseScrolledLnet/minecraft/client/gui/Element;mouseScrolled(DDD)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.- Specified by:
keyPressedin interfaceElement- 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 official aLeqk;a(III)Zintermediary method_25404Lnet/minecraft/class_364;method_25404(III)Znamed keyPressedLnet/minecraft/client/gui/Element;keyPressed(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.- Specified by:
keyReleasedin interfaceElement- 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 official bLeqk;b(III)Zintermediary method_16803Lnet/minecraft/class_364;method_16803(III)Znamed keyReleasedLnet/minecraft/client/gui/Element;keyReleased(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.- Specified by:
charTypedin interfaceElement- 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 official aLeqk;a(CI)Zintermediary method_25400Lnet/minecraft/class_364;method_25400(CI)Znamed charTypedLnet/minecraft/client/gui/Element;charTyped(CI)Z
-
getFocused
- Mappings:
Namespace Name Mixin selector official tLeqj;t()Leqk;intermediary method_25399Lnet/minecraft/class_4069;method_25399()Lnet/minecraft/class_364;named getFocusedLnet/minecraft/client/gui/ParentElement;getFocused()Lnet/minecraft/client/gui/Element;
-
setFocused
- Mappings:
Namespace Name Mixin selector official aLeqj;a(Leqk;)Vintermediary method_25395Lnet/minecraft/class_4069;method_25395(Lnet/minecraft/class_364;)Vnamed setFocusedLnet/minecraft/client/gui/ParentElement;setFocused(Lnet/minecraft/client/gui/Element;)V
-
setFocused
default void setFocused(boolean focused) - Specified by:
setFocusedin interfaceElement- Mappings:
Namespace Name Mixin selector official b_Leqk;b_(Z)Vintermediary method_25365Lnet/minecraft/class_364;method_25365(Z)Vnamed setFocusedLnet/minecraft/client/gui/Element;setFocused(Z)V
-
isFocused
default boolean isFocused() -
getFocusedPath
- Specified by:
getFocusedPathin interfaceElement- Mappings:
Namespace Name Mixin selector official aF_Leqk;aF_()Leom;intermediary method_48218Lnet/minecraft/class_364;method_48218()Lnet/minecraft/class_8016;named getFocusedPathLnet/minecraft/client/gui/Element;getFocusedPath()Lnet/minecraft/client/gui/navigation/GuiNavigationPath;
-
focusOn
- Mappings:
Namespace Name Mixin selector official bLeqj;b(Leqk;)Vintermediary method_20086Lnet/minecraft/class_4069;method_20086(Lnet/minecraft/class_364;)Vnamed focusOnLnet/minecraft/client/gui/ParentElement;focusOn(Lnet/minecraft/client/gui/Element;)V
-