public class GuiTextField extends Gui
Modifier and Type | Field and Description |
---|---|
private boolean |
canLoseFocus |
private int |
cursorCounter |
private int |
cursorPosition |
private int |
disabledColor |
private boolean |
enableBackgroundDrawing |
private int |
enabledColor |
private FontRenderer |
fontRenderer |
private GuiPageButtonList.GuiResponder |
guiResponder |
int |
height |
private int |
id |
private boolean |
isEnabled |
private boolean |
isFocused |
private int |
lineScrollOffset |
private int |
maxStringLength |
private int |
selectionEnd |
private java.lang.String |
text |
private com.google.common.base.Predicate<java.lang.String> |
validator |
private boolean |
visible |
int |
width |
int |
x |
int |
y |
ICONS, OPTIONS_BACKGROUND, STAT_ICONS, zLevel
Constructor and Description |
---|
GuiTextField(int componentId,
FontRenderer fontrendererObj,
int x,
int y,
int par5Width,
int par6Height) |
Modifier and Type | Method and Description |
---|---|
void |
deleteFromCursor(int num) |
void |
deleteWords(int num) |
private void |
drawSelectionBox(int startX,
int startY,
int endX,
int endY) |
void |
drawTextBox() |
int |
getCursorPosition() |
boolean |
getEnableBackgroundDrawing() |
int |
getId() |
int |
getMaxStringLength() |
int |
getNthWordFromCursor(int numWords) |
int |
getNthWordFromPos(int n,
int pos) |
int |
getNthWordFromPosWS(int n,
int pos,
boolean skipWs) |
java.lang.String |
getSelectedText() |
int |
getSelectionEnd() |
java.lang.String |
getText() |
boolean |
getVisible() |
int |
getWidth() |
boolean |
isFocused() |
boolean |
mouseClicked(int mouseX,
int mouseY,
int mouseButton) |
void |
moveCursorBy(int num) |
void |
setCanLoseFocus(boolean canLoseFocusIn) |
void |
setCursorPosition(int pos) |
void |
setCursorPositionEnd() |
void |
setCursorPositionZero() |
void |
setDisabledTextColour(int color) |
void |
setEnableBackgroundDrawing(boolean enableBackgroundDrawingIn) |
void |
setEnabled(boolean enabled) |
void |
setFocused(boolean isFocusedIn) |
void |
setGuiResponder(GuiPageButtonList.GuiResponder guiResponderIn) |
void |
setMaxStringLength(int length) |
void |
setResponderEntryValue(int idIn,
java.lang.String textIn) |
void |
setSelectionPos(int position) |
void |
setText(java.lang.String textIn) |
void |
setTextColor(int color) |
void |
setValidator(com.google.common.base.Predicate<java.lang.String> theValidator) |
void |
setVisible(boolean isVisible) |
boolean |
textboxKeyTyped(char typedChar,
int keyCode) |
void |
updateCursorCounter() |
void |
writeText(java.lang.String textToWrite) |
drawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLine
private final int id
private final FontRenderer fontRenderer
public int x
public int y
public int width
public int height
private java.lang.String text
private int maxStringLength
private int cursorCounter
private boolean enableBackgroundDrawing
private boolean canLoseFocus
private boolean isFocused
private boolean isEnabled
private int lineScrollOffset
private int cursorPosition
private int selectionEnd
private int enabledColor
private int disabledColor
private boolean visible
private GuiPageButtonList.GuiResponder guiResponder
private com.google.common.base.Predicate<java.lang.String> validator
public GuiTextField(int componentId, FontRenderer fontrendererObj, int x, int y, int par5Width, int par6Height)
public void setGuiResponder(GuiPageButtonList.GuiResponder guiResponderIn)
public void updateCursorCounter()
public void setText(java.lang.String textIn)
public java.lang.String getText()
public java.lang.String getSelectedText()
public void setValidator(com.google.common.base.Predicate<java.lang.String> theValidator)
public void writeText(java.lang.String textToWrite)
public void setResponderEntryValue(int idIn, java.lang.String textIn)
public void deleteWords(int num)
public void deleteFromCursor(int num)
public int getId()
public int getNthWordFromCursor(int numWords)
public int getNthWordFromPos(int n, int pos)
public int getNthWordFromPosWS(int n, int pos, boolean skipWs)
public void moveCursorBy(int num)
public void setCursorPosition(int pos)
public void setCursorPositionZero()
public void setCursorPositionEnd()
public boolean textboxKeyTyped(char typedChar, int keyCode)
public boolean mouseClicked(int mouseX, int mouseY, int mouseButton)
public void drawTextBox()
private void drawSelectionBox(int startX, int startY, int endX, int endY)
public void setMaxStringLength(int length)
public int getMaxStringLength()
public int getCursorPosition()
public boolean getEnableBackgroundDrawing()
public void setEnableBackgroundDrawing(boolean enableBackgroundDrawingIn)
public void setTextColor(int color)
public void setDisabledTextColour(int color)
public void setFocused(boolean isFocusedIn)
public boolean isFocused()
public void setEnabled(boolean enabled)
public int getSelectionEnd()
public int getWidth()
public void setSelectionPos(int position)
public void setCanLoseFocus(boolean canLoseFocusIn)
public boolean getVisible()
public void setVisible(boolean isVisible)