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 TypeFieldDescriptionprivate static final int
static final int
private static final int
private static final int
private boolean
private boolean
private static final String
private static final int
private static final int
private int
static final int
private int
private final Font
private BiFunction<String,
Integer, FormattedCharSequence> static final int
private int
private int
private Component
private boolean
private int
private boolean
private String
private int
private int
private String
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
ACCESSIBILITY_TEXTURE, active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, 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_) 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_) private boolean
private boolean
boolean
isMouseOver
(double p_94157_, double p_94158_) boolean
boolean
keyPressed
(int p_94132_, int p_94133_, int p_94134_) void
moveCursor
(int p_94189_) void
moveCursorTo
(int p_94193_) void
void
nextFocusPath
(FocusNavigationEvent p_265216_) 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_) 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
tick()
void
updateWidgetNarration
(NarrationElementOutput p_259237_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getRectangle, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onDrag, onRelease, render, renderScrollingString, renderScrollingString, renderTexture, setAlpha, setFGColor, setHeight, setMessage, 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
-
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:
-
BORDER_COLOR_FOCUSED
private static final int BORDER_COLOR_FOCUSED- See Also:
-
BORDER_COLOR
private static final int BORDER_COLOR- See Also:
-
BACKGROUND_COLOR
private static final int BACKGROUND_COLOR- See Also:
-
font
-
value
-
maxLength
private int maxLength -
frame
private int frame -
bordered
private boolean bordered -
canLoseFocus
private boolean canLoseFocus -
isEditable
private boolean isEditable -
shiftPressed
private boolean shiftPressed -
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
-
-
Constructor Details
-
EditBox
-
EditBox
-
-
Method Details
-
setResponder
-
setFormatter
-
tick
public void tick() -
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_) -
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_) -
getCursorPos
private int getCursorPos(int p_94221_) -
moveCursorTo
public void moveCursorTo(int p_94193_) -
setCursorPosition
public void setCursorPosition(int p_94197_) -
moveCursorToStart
public void moveCursorToStart() -
moveCursorToEnd
public void moveCursorToEnd() -
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
private boolean isBordered() -
setBordered
public void setBordered(boolean p_94183_) -
setTextColor
public void setTextColor(int p_94203_) -
setTextColorUneditable
public void setTextColorUneditable(int p_94206_) -
isMouseOver
public boolean isMouseOver(double p_94157_, double p_94158_) - Specified by:
isMouseOver
in interfaceGuiEventListener
- Overrides:
isMouseOver
in classAbstractWidget
-
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_) -
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
-