Class EditBox
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.EditBox
- All Implemented Interfaces:
GuiEventListener
,Renderable
,TabOrderedElement
,LayoutElement
,NarratableEntry
,NarrationSupplier
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
private boolean
private boolean
private static final String
private static final int
private static final int
private static final int
private int
static final int
private int
private long
private final Font
private BiFunction
<String, Integer, FormattedCharSequence> static final int
private int
private Component
private boolean
private int
private static final WidgetSprites
private String
private int
private int
private String
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
charTyped
(char p_94122_, int p_94123_) protected MutableComponent
void
deleteChars
(int p_94181_) void
deleteCharsToPos
(int p_310763_) private void
deleteText
(int p_94218_) void
deleteWords
(int p_94177_) private int
getCursorPos
(int p_94221_) int
int
private int
int
getScreenX
(int p_94212_) getValue()
int
getWordPosition
(int p_94185_) private int
getWordPosition
(int p_94129_, int p_94130_) private int
getWordPosition
(int p_94141_, int p_94142_, boolean p_94143_) void
insertText
(String p_94165_) boolean
private boolean
boolean
boolean
keyPressed
(int p_94132_, int p_94133_, int p_94134_) void
moveCursor
(int p_94189_, boolean p_297286_) void
moveCursorTo
(int p_94193_, boolean p_300521_) void
moveCursorToEnd
(boolean p_297711_) void
moveCursorToStart
(boolean p_299543_) void
onClick
(double p_279417_, double p_279437_) private void
onValueChange
(String p_94175_) void
playDownSound
(SoundManager p_279245_) private void
renderHighlight
(GuiGraphics p_281400_, int p_265338_, int p_265693_, int p_265618_, int p_265584_) void
renderWidget
(GuiGraphics p_283252_, int p_281594_, int p_282100_, float p_283101_) private void
scrollTo
(int p_299591_) void
setBordered
(boolean p_94183_) void
setCanLoseFocus
(boolean p_94191_) void
setCursorPosition
(int p_94197_) void
setEditable
(boolean p_94187_) void
void
setFocused
(boolean p_265520_) void
setFormatter
(BiFunction<String, Integer, FormattedCharSequence> p_94150_) void
setHighlightPos
(int p_94209_) void
void
setMaxLength
(int p_94200_) void
setResponder
(Consumer<String> p_94152_) void
setSuggestion
(String p_94168_) void
setTextColor
(int p_94203_) void
setTextColorUneditable
(int p_94206_) void
void
setVisible
(boolean p_94195_) void
updateWidgetNarration
(NarrationElementOutput p_259237_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage
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.GuiEventListener
getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
Methods inherited from interface net.minecraft.client.gui.components.Renderable
render
-
Field Details
-
SPRITES
-
BACKWARDS
public static final int BACKWARDS- See Also:
-
FORWARDS
public static final int FORWARDS- See Also:
-
CURSOR_INSERT_WIDTH
private static final int CURSOR_INSERT_WIDTH- See Also:
-
CURSOR_INSERT_COLOR
private static final int CURSOR_INSERT_COLOR- See Also:
-
CURSOR_APPEND_CHARACTER
- See Also:
-
DEFAULT_TEXT_COLOR
public static final int DEFAULT_TEXT_COLOR- See Also:
-
CURSOR_BLINK_INTERVAL_MS
private static final int CURSOR_BLINK_INTERVAL_MS- See Also:
-
font
-
value
-
maxLength
private int maxLength -
bordered
private boolean bordered -
canLoseFocus
private boolean canLoseFocus -
isEditable
private boolean isEditable -
displayPos
private int displayPos -
cursorPos
private int cursorPos -
highlightPos
private int highlightPos -
textColor
private int textColor -
textColorUneditable
private int textColorUneditable -
suggestion
-
responder
-
filter
-
formatter
-
hint
-
focusedTime
private long focusedTime
-
-
Constructor Details
-
EditBox
-
EditBox
-
EditBox
-
-
Method Details
-
setResponder
-
setFormatter
-
createNarrationMessage
- Overrides:
createNarrationMessage
in classAbstractWidget
-
setValue
-
getValue
-
getHighlighted
-
setFilter
-
insertText
-
onValueChange
-
deleteText
private void deleteText(int p_94218_) -
deleteWords
public void deleteWords(int p_94177_) -
deleteChars
public void deleteChars(int p_94181_) -
deleteCharsToPos
public void deleteCharsToPos(int p_310763_) -
getWordPosition
public int getWordPosition(int p_94185_) -
getWordPosition
private int getWordPosition(int p_94129_, int p_94130_) -
getWordPosition
private int getWordPosition(int p_94141_, int p_94142_, boolean p_94143_) -
moveCursor
public void moveCursor(int p_94189_, boolean p_297286_) -
getCursorPos
private int getCursorPos(int p_94221_) -
moveCursorTo
public void moveCursorTo(int p_94193_, boolean p_300521_) -
setCursorPosition
public void setCursorPosition(int p_94197_) -
moveCursorToStart
public void moveCursorToStart(boolean p_299543_) -
moveCursorToEnd
public void moveCursorToEnd(boolean p_297711_) -
keyPressed
public boolean keyPressed(int p_94132_, int p_94133_, int p_94134_) - Specified by:
keyPressed
in interfaceGuiEventListener
-
canConsumeInput
public boolean canConsumeInput() -
charTyped
public boolean charTyped(char p_94122_, int p_94123_) - Specified by:
charTyped
in interfaceGuiEventListener
-
onClick
public void onClick(double p_279417_, double p_279437_) - Overrides:
onClick
in classAbstractWidget
-
playDownSound
- Overrides:
playDownSound
in classAbstractWidget
-
renderWidget
- Specified by:
renderWidget
in classAbstractWidget
-
renderHighlight
private void renderHighlight(GuiGraphics p_281400_, int p_265338_, int p_265693_, int p_265618_, int p_265584_) -
setMaxLength
public void setMaxLength(int p_94200_) -
getMaxLength
private int getMaxLength() -
getCursorPosition
public int getCursorPosition() -
isBordered
public boolean isBordered() -
setBordered
public void setBordered(boolean p_94183_) -
setTextColor
public void setTextColor(int p_94203_) -
setTextColorUneditable
public void setTextColorUneditable(int p_94206_) -
setFocused
public void setFocused(boolean p_265520_) - Specified by:
setFocused
in interfaceGuiEventListener
- Overrides:
setFocused
in classAbstractWidget
-
isEditable
private boolean isEditable() -
setEditable
public void setEditable(boolean p_94187_) -
getInnerWidth
public int getInnerWidth() -
setHighlightPos
public void setHighlightPos(int p_94209_) -
scrollTo
private void scrollTo(int p_299591_) -
setCanLoseFocus
public void setCanLoseFocus(boolean p_94191_) -
isVisible
public boolean isVisible() -
setVisible
public void setVisible(boolean p_94195_) -
setSuggestion
-
getScreenX
public int getScreenX(int p_94212_) -
updateWidgetNarration
- Specified by:
updateWidgetNarration
in classAbstractWidget
-
setHint
-