Class ContainerObjectSelectionList.Entry<E extends ContainerObjectSelectionList.Entry<E>>
java.lang.Object
net.minecraft.client.gui.components.AbstractSelectionList.Entry<E>
net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry<E>
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,TabOrderedElement
- Direct Known Subclasses:
EditGameRulesScreen.RuleEntry,KeyBindsList.Entry,OptionsList.Entry,PlayerEntry,RealmsBackupScreen.Entry,RealmsPlayerScreen.Entry,ScrollableExperimentsScreen.ExperimentSelectionList.ExperimentEntry,ServerLinksScreen.LinkListEntry
- Enclosing class:
ContainerObjectSelectionList<E extends ContainerObjectSelectionList.Entry<E>>
public abstract static class ContainerObjectSelectionList.Entry<E extends ContainerObjectSelectionList.Entry<E>>
extends AbstractSelectionList.Entry<E>
implements ContainerEventHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate GuiEventListenerprivate NarratableEntryFields inherited from class net.minecraft.client.gui.components.AbstractSelectionList.Entry
listFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfocusPathAtIndex(FocusNavigationEvent event, int index) booleanbooleanmouseClicked(double mouseX, double mouseY, int button) Called when a mouse button is clicked within the GUI element.abstract List<? extends NarratableEntry> Retrieves the next focus path based on the given focus navigation event.voidsetDragging(boolean dragging) Sets if the GUI element is dragging or not.voidsetFocused(GuiEventListener listener) Sets the focus state of the GUI element.(package private) voidupdateNarration(NarrationElementOutput narrationElementOutput) Methods inherited from class net.minecraft.client.gui.components.AbstractSelectionList.Entry
isFocused, isMouseOver, render, renderBack, setFocusedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, children, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getRectangle, isMouseOver, mouseMovedMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
focused
-
lastNarratable
-
dragging
private boolean dragging
-
-
Constructor Details
-
Entry
public Entry()
-
-
Method Details
-
isDragging
public boolean isDragging()- Specified by:
isDraggingin interfaceContainerEventHandler
-
setDragging
public void setDragging(boolean dragging) Sets if the GUI element is dragging or not.- Specified by:
setDraggingin interfaceContainerEventHandler- Parameters:
dragging- the dragging state of the GUI element.
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) Called when a mouse button is clicked within the GUI element.- Specified by:
mouseClickedin interfaceContainerEventHandler- Specified by:
mouseClickedin interfaceGuiEventListener- Parameters:
mouseX- the X coordinate of the mouse.mouseY- the Y coordinate of the mouse.button- the button that was clicked.- Returns:
trueif the event is consumed,falseotherwise.
-
setFocused
Sets the focus state of the GUI element.- Specified by:
setFocusedin interfaceContainerEventHandler- Parameters:
listener- the focused GUI element.
-
getFocused
- Specified by:
getFocusedin interfaceContainerEventHandler
-
narratables
-
updateNarration
-