Class TabNavigationBar
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.components.tabs.TabNavigationBar
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,Renderable
,TabOrderedElement
,NarratableEntry
,NarrationSupplier
public class TabNavigationBar
extends AbstractContainerEventHandler
implements Renderable, GuiEventListener, NarratableEntry
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
private final GridLayout
private static final int
private static final int
private static final int
private final com.google.common.collect.ImmutableList<TabButton>
private final TabManager
private final com.google.common.collect.ImmutableList<Tab>
private static final Component
private int
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, LIGHT_DIRT_BACKGROUND, STATS_ICON_LOCATION
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionTabNavigationBar
(int p_275379_, TabManager p_275624_, Iterable<Tab> p_275279_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
static TabNavigationBar.Builder
builder
(TabManager p_268126_, int p_268070_) List<? extends GuiEventListener>
children()
private @Nullable TabButton
private int
private int
getNextTabIndex
(int p_270508_) boolean
keyPressed
(int p_270495_) protected void
narrateListElementPosition
(NarrationElementOutput p_275386_, TabButton p_275397_) @Nullable ComponentPath
nextFocusPath
(FocusNavigationEvent p_275418_) void
void
selectTab
(int p_276107_, boolean p_276125_) void
setFocused
(boolean p_275488_) void
setFocused
(@Nullable GuiEventListener p_275675_) void
setWidth
(int p_268094_) void
updateNarration
(NarrationElementOutput p_275583_) Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
getFocused, isDragging, setDragging
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blit, blitNineSliced, blitNineSliced, blitNineSliced, blitOutlineBlack, blitRepeating, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fill, fillGradient, fillGradient, fillGradient, hLine, renderOutline, vLine
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
isMouseOver, mouseMoved
Methods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
isActive
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
NO_TAB
private static final int NO_TAB- See Also:
-
MAX_WIDTH
private static final int MAX_WIDTH- See Also:
-
HEIGHT
private static final int HEIGHT- See Also:
-
MARGIN
private static final int MARGIN- See Also:
-
USAGE_NARRATION
-
layout
-
width
private int width -
tabManager
-
tabs
-
tabButtons
-
-
Constructor Details
-
TabNavigationBar
TabNavigationBar(int p_275379_, TabManager p_275624_, Iterable<Tab> p_275279_)
-
-
Method Details
-
builder
-
setWidth
public void setWidth(int p_268094_) -
setFocused
public void setFocused(boolean p_275488_) - Specified by:
setFocused
in interfaceContainerEventHandler
- Specified by:
setFocused
in interfaceGuiEventListener
-
setFocused
- Specified by:
setFocused
in interfaceContainerEventHandler
- Overrides:
setFocused
in classAbstractContainerEventHandler
-
children
- Specified by:
children
in interfaceContainerEventHandler
-
narrationPriority
- Specified by:
narrationPriority
in interfaceNarratableEntry
-
updateNarration
- Specified by:
updateNarration
in interfaceNarrationSupplier
-
narrateListElementPosition
-
render
- Specified by:
render
in interfaceRenderable
-
getRectangle
- Specified by:
getRectangle
in interfaceGuiEventListener
-
arrangeElements
public void arrangeElements() -
selectTab
public void selectTab(int p_276107_, boolean p_276125_) -
keyPressed
public boolean keyPressed(int p_270495_) -
getNextTabIndex
private int getNextTabIndex(int p_270508_) -
currentTabIndex
private int currentTabIndex() -
currentTabButton
-