Package net.minecraft.client.gui.font
Class TextFieldHelper
java.lang.Object
net.minecraft.client.gui.font.TextFieldHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(char p_95144_)private intclampToMsgLength(int p_95196_)voidcopy()createClipboardGetter(Minecraft p_95154_)createClipboardSetter(Minecraft p_95183_)voidcut()private StringdeleteSelection(String p_95185_)static StringgetClipboardContents(Minecraft p_95170_)intprivate StringgetSelected(String p_95175_)intvoidinsertText(String p_95159_)private voidinsertText(String p_95161_, String p_95162_)booleanbooleankeyPressed(int p_95146_)voidmoveByChars(int p_169094_)voidmoveByChars(int p_95151_, boolean p_95152_)voidmoveByWords(int p_169096_)voidmoveByWords(int p_95167_, boolean p_95168_)voidpaste()voidremoveCharsFromCursor(int p_95190_)private voidresetSelectionIfNeeded(boolean p_95164_)voidstatic voidsetClipboardContents(Minecraft p_95156_, String p_95157_)voidsetCursorPos(int p_169099_)voidsetCursorPos(int p_95180_, boolean p_95181_)voidprivate voidsetCursorToEnd(boolean p_95187_)voidprivate voidsetCursorToStart(boolean p_95177_)voidsetSelectionPos(int p_169101_)voidsetSelectionRange(int p_95148_, int p_95149_)
-
Field Details
-
getMessageFn
-
setMessageFn
-
getClipboardFn
-
setClipboardFn
-
stringValidator
-
cursorPos
private int cursorPos -
selectionPos
private int selectionPos
-
-
Constructor Details
-
TextFieldHelper
-
-
Method Details
-
createClipboardGetter
-
getClipboardContents
-
createClipboardSetter
-
setClipboardContents
-
charTyped
public boolean charTyped(char p_95144_) -
keyPressed
public boolean keyPressed(int p_95146_) -
clampToMsgLength
private int clampToMsgLength(int p_95196_) -
insertText
-
insertText
-
resetSelectionIfNeeded
private void resetSelectionIfNeeded(boolean p_95164_) -
moveByChars
public void moveByChars(int p_169094_) -
moveByChars
public void moveByChars(int p_95151_, boolean p_95152_) -
moveByWords
public void moveByWords(int p_169096_) -
moveByWords
public void moveByWords(int p_95167_, boolean p_95168_) -
removeCharsFromCursor
public void removeCharsFromCursor(int p_95190_) -
cut
public void cut() -
paste
public void paste() -
copy
public void copy() -
selectAll
public void selectAll() -
getSelected
-
deleteSelection
-
setCursorToStart
public void setCursorToStart() -
setCursorToStart
private void setCursorToStart(boolean p_95177_) -
setCursorToEnd
public void setCursorToEnd() -
setCursorToEnd
private void setCursorToEnd(boolean p_95187_) -
getCursorPos
public int getCursorPos() -
setCursorPos
public void setCursorPos(int p_169099_) -
setCursorPos
public void setCursorPos(int p_95180_, boolean p_95181_) -
getSelectionPos
public int getSelectionPos() -
setSelectionPos
public void setSelectionPos(int p_169101_) -
setSelectionRange
public void setSelectionRange(int p_95148_, int p_95149_) -
isSelecting
public boolean isSelecting()
-