Class RecipeBookTabButton
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractWidget.WithInactiveMessage
net.minecraft.client.gui.components.AbstractButton
net.minecraft.client.gui.components.Button
net.minecraft.client.gui.components.ImageButton
net.minecraft.client.gui.screens.recipebook.RecipeBookTabButton
- All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier
-
Nested Class Summary
Nested classes/interfaces inherited from class Button
Button.Builder, Button.CreateNarration, Button.OnPress, Button.PlainNested classes/interfaces inherited from class AbstractWidget
AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final floatprivate floatstatic final intprivate booleanprivate static final WidgetSpritesprivate final RecipeBookComponent.TabInfostatic final intFields inherited from class ImageButton
spritesFields inherited from class Button
BIG_WIDTH, createNarration, DEFAULT_HEIGHT, DEFAULT_NARRATION, DEFAULT_SPACING, DEFAULT_WIDTH, onPress, SMALL_WIDTHFields inherited from class AbstractButton
TEXT_MARGINFields inherited from class AbstractWidget
active, alpha, height, isHovered, message, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
ConstructorsConstructorDescriptionRecipeBookTabButton(int x, int y, RecipeBookComponent.TabInfo tabInfo, Button.OnPress onPress) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleCursor(GuiGraphics graphics) voidrenderContents(GuiGraphics graphics, int mouseX, int mouseY, float a) private voidrenderIcon(GuiGraphics graphics) voidselect()voidstartAnimation(ClientRecipeBook recipeBook, boolean isFiltering) voidunselect()booleanMethods inherited from class Button
builder, createNarrationMessage, onPress, updateWidgetNarrationMethods inherited from class AbstractButton
keyPressed, onClick, renderDefaultLabel, renderDefaultSprite, renderWidget, setOverrideRenderHighlightedSpriteMethods inherited from class AbstractWidget.WithInactiveMessage
defaultInactiveMessage, getMessage, setMessageMethods inherited from class AbstractWidget
clearFGColor, defaultButtonNarrationText, getAlpha, getBottom, getFGColor, getHeight, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playButtonClickSound, playDownSound, render, renderScrollingStringOverContents, setAlpha, setFGColor, setFocused, setHeight, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface NarratableEntry
getNarratables
-
Field Details
-
SPRITES
-
WIDTH
public static final int WIDTH- See Also:
-
HEIGHT
public static final int HEIGHT- See Also:
-
tabInfo
-
ANIMATION_TIME
private static final float ANIMATION_TIME- See Also:
-
animationTime
private float animationTime -
selected
private boolean selected
-
-
Constructor Details
-
RecipeBookTabButton
public RecipeBookTabButton(int x, int y, RecipeBookComponent.TabInfo tabInfo, Button.OnPress onPress)
-
-
Method Details
-
startAnimation
-
renderContents
- Overrides:
renderContentsin classImageButton
-
handleCursor
- Overrides:
handleCursorin classAbstractWidget
-
renderIcon
-
getCategory
-
updateVisibility
-
select
public void select() -
unselect
public void unselect()
-