Class ImageWidget
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.ImageWidget
- All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier
- Direct Known Subclasses:
ImageWidget.Sprite, ImageWidget.Texture
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classNested classes/interfaces inherited from class AbstractWidget
AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
Fields inherited from class AbstractWidget
active, alpha, height, isHovered, message, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisActive()@Nullable ComponentPathnextFocusPath(FocusNavigationEvent navigationEvent) Retrieves the next focus path based on the given focus navigation event.voidplayDownSound(SoundManager soundManager) static ImageWidgetsprite(int width, int height, Identifier sprite) static ImageWidgettexture(int width, int height, Identifier texture, int textureWidth, int textureHeight) abstract voidupdateResource(Identifier identifier) protected voidMethods inherited from class AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, getAlpha, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onClick, onDrag, onRelease, playButtonClickSound, render, renderScrollingStringOverContents, renderWidget, setAlpha, setFGColor, setFocused, setHeight, setMessage, 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, keyPressed, keyReleased, mouseMoved, mouseScrolled, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface NarratableEntry
getNarratables
-
Constructor Details
-
ImageWidget
private ImageWidget(int x, int y, int width, int height)
-
-
Method Details
-
texture
public static ImageWidget texture(int width, int height, Identifier texture, int textureWidth, int textureHeight) -
sprite
-
updateWidgetNarration
- Specified by:
updateWidgetNarrationin classAbstractWidget
-
playDownSound
- Overrides:
playDownSoundin classAbstractWidget
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceNarratableEntry- Overrides:
isActivein classAbstractWidget
-
updateResource
-