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 pCharacter) private int
clampToMsgLength
(int pTextIndex) void
copy()
createClipboardGetter
(Minecraft pMinecraft) createClipboardSetter
(Minecraft pMinecraft) void
cut()
private String
deleteSelection
(String pText) static String
getClipboardContents
(Minecraft pMinecraft) int
private String
getSelected
(String pText) int
void
insertText
(String pText) private void
insertText
(String pText, String pClipboardText) boolean
boolean
keyPressed
(int pKey) void
moveBy
(int pDirection, boolean pKeepSelection, TextFieldHelper.CursorStep pCursorStep) void
moveByChars
(int pDirection) void
moveByChars
(int pDirection, boolean pKeepSelection) void
moveByWords
(int pDirection) void
moveByWords
(int pDirection, boolean pKeepSelection) void
paste()
void
removeCharsFromCursor
(int pDirection) void
removeFromCursor
(int pDirection, TextFieldHelper.CursorStep pStep) void
removeWordsFromCursor
(int pDirection) private void
resetSelectionIfNeeded
(boolean pKeepSelection) void
static void
setClipboardContents
(Minecraft pMinecraft, String pText) void
setCursorPos
(int pTextIndex) void
setCursorPos
(int pTextIndex, boolean pKeepSelection) void
void
setCursorToEnd
(boolean pKeepSelection) void
void
setCursorToStart
(boolean pKeepSelection) void
setSelectionPos
(int pTextIndex) void
setSelectionRange
(int pSelectionStart, int pSelectionEnd)
-
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 pCharacter) -
keyPressed
public boolean keyPressed(int pKey) -
clampToMsgLength
private int clampToMsgLength(int pTextIndex) -
insertText
-
insertText
-
resetSelectionIfNeeded
private void resetSelectionIfNeeded(boolean pKeepSelection) -
moveBy
-
moveByChars
public void moveByChars(int pDirection) -
moveByChars
public void moveByChars(int pDirection, boolean pKeepSelection) -
moveByWords
public void moveByWords(int pDirection) -
moveByWords
public void moveByWords(int pDirection, boolean pKeepSelection) -
removeFromCursor
-
removeWordsFromCursor
public void removeWordsFromCursor(int pDirection) -
removeCharsFromCursor
public void removeCharsFromCursor(int pDirection) -
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 pKeepSelection) -
setCursorToEnd
public void setCursorToEnd() -
setCursorToEnd
public void setCursorToEnd(boolean pKeepSelection) -
getCursorPos
public int getCursorPos() -
setCursorPos
public void setCursorPos(int pTextIndex) -
setCursorPos
public void setCursorPos(int pTextIndex, boolean pKeepSelection) -
getSelectionPos
public int getSelectionPos() -
setSelectionPos
public void setSelectionPos(int pTextIndex) -
setSelectionRange
public void setSelectionRange(int pSelectionStart, int pSelectionEnd) -
isSelecting
public boolean isSelecting()
-