Class FocusableTextWidget
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractStringWidget
net.minecraft.client.gui.components.MultiLineTextWidget
net.minecraft.client.gui.components.FocusableTextWidget
- All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classNested classes/interfaces inherited from class AbstractWidget
AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final FocusableTextWidget.BackgroundFillstatic final intprivate final intprivate final intFields inherited from class AbstractWidget
active, alpha, height, isHovered, message, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFocusableTextWidget(Component message, Font font, int padding, int maxWidth, FocusableTextWidget.BackgroundFill backgroundFill, boolean alwaysShowBorder) -
Method Summary
Modifier and TypeMethodDescriptionstatic FocusableTextWidget.Builderstatic FocusableTextWidget.Builderintintprotected intgetTextX()protected intgetTextY()intgetWidth()voidplayDownSound(SoundManager soundManager) voidrenderWidget(GuiGraphics graphics, int mouseX, int mouseY, float a) setMaxWidth(int maxWidth) voidsetMessage(Component message) voidprotected voidvoidMethods inherited from class MultiLineTextWidget
setCentered, setMaxRows, visitLinesMethods inherited from class AbstractStringWidget
getFont, onClick, setComponentClickHandlerMethods inherited from class AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, getAlpha, getBottom, getFGColor, getMessage, getRectangle, getRight, getTabOrderGroup, getX, getY, handleCursor, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playButtonClickSound, 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, keyPressed, keyReleased, mouseMoved, mouseScrolled, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface NarratableEntry
getNarratables
-
Field Details
-
DEFAULT_PADDING
public static final int DEFAULT_PADDING- See Also:
-
padding
private final int padding -
maxWidth
private final int maxWidth -
alwaysShowBorder
private final boolean alwaysShowBorder -
backgroundFill
-
-
Constructor Details
-
FocusableTextWidget
private FocusableTextWidget(Component message, Font font, int padding, int maxWidth, FocusableTextWidget.BackgroundFill backgroundFill, boolean alwaysShowBorder)
-
-
Method Details
-
updateWidgetNarration
- Overrides:
updateWidgetNarrationin classAbstractStringWidget
-
renderWidget
- Overrides:
renderWidgetin classAbstractStringWidget
-
getTextX
protected int getTextX()- Overrides:
getTextXin classMultiLineTextWidget
-
getTextY
protected int getTextY()- Overrides:
getTextYin classMultiLineTextWidget
-
setMaxWidth
- Overrides:
setMaxWidthin classMultiLineTextWidget
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceLayoutElement- Overrides:
getWidthin classMultiLineTextWidget
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceLayoutElement- Overrides:
getHeightin classMultiLineTextWidget
-
getPadding
public int getPadding() -
updateWidth
public void updateWidth() -
updateHeight
public void updateHeight() -
setMessage
- Overrides:
setMessagein classAbstractStringWidget
-
playDownSound
- Overrides:
playDownSoundin classAbstractWidget
-
builder
-
builder
-