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 TypeClassDescription(package private) static class(package private) static classNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisActive()nextFocusPath(FocusNavigationEvent p_296129_) Retrieves the next focus path based on the given focus navigation event.voidplayDownSound(SoundManager p_295108_) static ImageWidgetsprite(int pWidth, int pHeight, ResourceLocation pSprite) static ImageWidgettexture(int pWidth, int pHeight, ResourceLocation pTexture, int pTextureWidth, int pTextureHeight) abstract voidupdateResource(ResourceLocation pResource) protected voidupdateWidgetNarration(NarrationElementOutput p_275454_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onClick, onDrag, onRelease, playButtonClickSound, render, renderScrollingString, renderScrollingString, renderScrollingString, renderWidget, setAlpha, setFGColor, setFocused, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods 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.GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyPressed, keyReleased, mouseMoved, mouseScrolled, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
getNarratables
-
Constructor Details
-
ImageWidget
ImageWidget(int pX, int pY, int pWidth, int pHeight)
-
-
Method Details
-
texture
public static ImageWidget texture(int pWidth, int pHeight, ResourceLocation pTexture, int pTextureWidth, int pTextureHeight) -
sprite
-
updateWidgetNarration
- Specified by:
updateWidgetNarrationin classAbstractWidget
-
playDownSound
- Overrides:
playDownSoundin classAbstractWidget
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceNarratableEntry- Overrides:
isActivein classAbstractWidget
-
updateResource
-