public class TextFieldTransparent
extends net.minecraft.client.gui.AbstractGui
Constructor and Description |
---|
TextFieldTransparent(net.minecraft.client.gui.FontRenderer par1FontRenderer,
int par2,
int par3,
int par4,
int par5) |
Modifier and Type | Method and Description |
---|---|
boolean |
charTyped(char par1,
int par2)
Call this method from you GuiScreen to process the keys into textbox.
|
void |
deleteFromCursor(int par1)
delete the selected text, otherwsie deletes characters from either side of the cursor.
|
void |
deleteWords(int par1)
Deletes the specified number of words starting at the cursor position.
|
int |
func_73798_a(int par1,
int par2,
boolean par3) |
void |
func_82265_c(boolean par1) |
void |
func_82266_h(int par1) |
int |
getCursorPosition()
returns the current position of the cursor
|
boolean |
getEnableBackgroundDrawing()
get enable drawing background and outline
|
int |
getMaxStringLength()
returns the maximum number of character that can be contained in this textbox
|
int |
getNthWordFromCursor(int par1)
see @getNthNextWordFromPos() params: N, position
|
int |
getNthWordFromPos(int par1,
int par2)
gets the position of the nth word.
|
java.lang.String |
getSelectedtext() |
int |
getSelectionEnd()
the side of the selection that is not the cursor, maye be the same as the cursor
|
java.lang.String |
getText()
Returns the text beign edited on the textbox.
|
boolean |
getVisible() |
int |
getWidth()
returns the width of the textbox depending on if the the box is enabled
|
boolean |
isFocused()
getter for the focused field
|
void |
keyPressed(int keyCode) |
void |
mouseClicked(double par1,
double par2,
int par3)
Args: x, y, buttonClicked
|
void |
moveCursorBy(int par1)
Moves the text cursor by a specified number of characters and clears the selection
|
void |
renderWidget(com.mojang.blaze3d.matrix.MatrixStack matrix,
int mouseX,
int mouseY,
float partialTicks)
Draws the textbox
|
void |
setCanLoseFocus(boolean par1)
if true the textbox can lose focus by clicking elsewhere on the screen
|
void |
setCursorPosition(int par1)
sets the position of the cursor to the provided index
|
void |
setCursorPositionEnd()
sets the cursors position to after the text
|
void |
setCursorPositionZero()
sets the cursors position to the beginning
|
void |
setEnableBackgroundDrawing(boolean par1)
enable drawing background and outline
|
void |
setFocused(boolean par1)
setter for the focused field
|
void |
setMaxStringLength(int par1) |
void |
setSelectionPos(int par1)
Sets the position of the selection anchor (i.e.
|
void |
setText(java.lang.String par1Str)
Sets the text of the textbox.
|
void |
setTextColor(int par1)
Sets the text colour for this textbox (disabled text will not use this colour)
|
void |
setVisible(boolean par1)
Sets whether or not this textbox is visible
|
void |
updateCursorCounter()
Increments the cursor counter
|
void |
writeText(java.lang.String par1Str)
replaces selected text, or inserts text at the position on the cursor
|
public TextFieldTransparent(net.minecraft.client.gui.FontRenderer par1FontRenderer, int par2, int par3, int par4, int par5)
public void updateCursorCounter()
public void setText(java.lang.String par1Str)
public java.lang.String getText()
public java.lang.String getSelectedtext()
public void writeText(java.lang.String par1Str)
public void deleteWords(int par1)
public void deleteFromCursor(int par1)
public int getNthWordFromCursor(int par1)
public int getNthWordFromPos(int par1, int par2)
public int func_73798_a(int par1, int par2, boolean par3)
public void moveCursorBy(int par1)
public void setCursorPosition(int par1)
public void setCursorPositionZero()
public void setCursorPositionEnd()
public boolean charTyped(char par1, int par2)
public void keyPressed(int keyCode)
public void mouseClicked(double par1, double par2, int par3)
public void renderWidget(com.mojang.blaze3d.matrix.MatrixStack matrix, int mouseX, int mouseY, float partialTicks)
public void setMaxStringLength(int par1)
public int getMaxStringLength()
public int getCursorPosition()
public boolean getEnableBackgroundDrawing()
public void setEnableBackgroundDrawing(boolean par1)
public void setTextColor(int par1)
public void func_82266_h(int par1)
public void setFocused(boolean par1)
public boolean isFocused()
public void func_82265_c(boolean par1)
public int getSelectionEnd()
public int getWidth()
public void setSelectionPos(int par1)
public void setCanLoseFocus(boolean par1)
public boolean getVisible()
true
if this textbox is visiblepublic void setVisible(boolean par1)