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 int
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
charTyped
(char character) private int
clampToMsgLength
(int textIndex) void
copy()
createClipboardGetter
(Minecraft minecraft) createClipboardSetter
(Minecraft minecraft) void
cut()
private String
deleteSelection
(String text) static String
getClipboardContents
(Minecraft minecraft) int
private String
getSelected
(String text) int
void
insertText
(String text) private void
insertText
(String text, String clipboardText) boolean
boolean
keyPressed
(int key) void
moveBy
(int direction, boolean keepSelection, TextFieldHelper.CursorStep cursorStep) void
moveByChars
(int direction) void
moveByChars
(int direction, boolean keepSelection) void
moveByWords
(int direction) void
moveByWords
(int direction, boolean keepSelection) void
paste()
void
removeCharsFromCursor
(int direction) void
removeFromCursor
(int direction, TextFieldHelper.CursorStep step) void
removeWordsFromCursor
(int direction) private void
resetSelectionIfNeeded
(boolean keepSelection) void
static void
setClipboardContents
(Minecraft minecraft, String text) void
setCursorPos
(int textIndex) void
setCursorPos
(int textIndex, boolean keepSelection) void
void
setCursorToEnd
(boolean keepSelection) void
void
setCursorToStart
(boolean keepSelection) void
setSelectionPos
(int textIndex) void
setSelectionRange
(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()
-