Package net.minecraft.client.gui.font
Class TextFieldHelper
java.lang.Object
net.minecraft.client.gui.font.TextFieldHelper
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(char character) private intclampToMsgLength(int textIndex) voidcopy()createClipboardGetter(Minecraft minecraft) createClipboardSetter(Minecraft minecraft) voidcut()private StringdeleteSelection(String text) static StringgetClipboardContents(Minecraft minecraft) intprivate StringgetSelected(String text) intvoidinsertText(String text) private voidinsertText(String text, String clipboardText) booleanbooleankeyPressed(int key) voidmoveBy(int direction, boolean keepSelection, TextFieldHelper.CursorStep cursorStep) voidmoveByChars(int direction) voidmoveByChars(int direction, boolean keepSelection) voidmoveByWords(int direction) voidmoveByWords(int direction, boolean keepSelection) voidpaste()voidremoveCharsFromCursor(int direction) voidremoveFromCursor(int direction, TextFieldHelper.CursorStep step) voidremoveWordsFromCursor(int direction) private voidresetSelectionIfNeeded(boolean keepSelection) voidstatic voidsetClipboardContents(Minecraft minecraft, String text) voidsetCursorPos(int textIndex) voidsetCursorPos(int textIndex, boolean keepSelection) voidvoidsetCursorToEnd(boolean keepSelection) voidvoidsetCursorToStart(boolean keepSelection) voidsetSelectionPos(int textIndex) voidsetSelectionRange(int selectionStart, int selectionEnd)
-
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 character) -
keyPressed
public boolean keyPressed(int key) -
clampToMsgLength
private int clampToMsgLength(int textIndex) -
insertText
-
insertText
-
resetSelectionIfNeeded
private void resetSelectionIfNeeded(boolean keepSelection) -
moveBy
-
moveByChars
public void moveByChars(int direction) -
moveByChars
public void moveByChars(int direction, boolean keepSelection) -
moveByWords
public void moveByWords(int direction) -
moveByWords
public void moveByWords(int direction, boolean keepSelection) -
removeFromCursor
-
removeWordsFromCursor
public void removeWordsFromCursor(int direction) -
removeCharsFromCursor
public void removeCharsFromCursor(int direction) -
cut
public void cut() -
paste
public void paste() -
copy
public void copy() -
selectAll
public void selectAll() -
getSelected
-
deleteSelection
-
setCursorToStart
public void setCursorToStart() -
setCursorToStart
public void setCursorToStart(boolean keepSelection) -
setCursorToEnd
public void setCursorToEnd() -
setCursorToEnd
public void setCursorToEnd(boolean keepSelection) -
getCursorPos
public int getCursorPos() -
setCursorPos
public void setCursorPos(int textIndex) -
setCursorPos
public void setCursorPos(int textIndex, boolean keepSelection) -
getSelectionPos
public int getSelectionPos() -
setSelectionPos
public void setSelectionPos(int textIndex) -
setSelectionRange
public void setSelectionRange(int selectionStart, int selectionEnd) -
isSelecting
public boolean isSelecting()
-