YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
net.minecraft.client.gui.GuiTextField Class Reference
Inheritance diagram for net.minecraft.client.gui.GuiTextField:
net.minecraft.client.gui.Gui

Public Member Functions

 GuiTextField (FontRenderer par1FontRenderer, int par2, int par3, int par4, int par5)
 
void updateCursorCounter ()
 
void setText (String par1Str)
 
String getText ()
 
String getSelectedtext ()
 
void writeText (String par1Str)
 
void deleteWords (int par1)
 
void deleteFromCursor (int par1)
 
int getNthWordFromCursor (int par1)
 
int getNthWordFromPos (int par1, int par2)
 
int func_73798_a (int par1, int par2, boolean par3)
 
void moveCursorBy (int par1)
 
void setCursorPosition (int par1)
 
void setCursorPositionZero ()
 
void setCursorPositionEnd ()
 
boolean textboxKeyTyped (char par1, int par2)
 
void mouseClicked (int par1, int par2, int par3)
 
void drawTextBox ()
 
void setMaxStringLength (int par1)
 
int getMaxStringLength ()
 
int getCursorPosition ()
 
boolean getEnableBackgroundDrawing ()
 
void setEnableBackgroundDrawing (boolean par1)
 
void setTextColor (int par1)
 
void setDisabledTextColour (int par1)
 
void setFocused (boolean par1)
 
boolean isFocused ()
 
void setEnabled (boolean par1)
 
int getSelectionEnd ()
 
int getWidth ()
 
void setSelectionPos (int par1)
 
void setCanLoseFocus (boolean par1)
 
boolean getVisible ()
 
void setVisible (boolean par1)
 
- Public Member Functions inherited from net.minecraft.client.gui.Gui
void drawCenteredString (FontRenderer par1FontRenderer, String par2Str, int par3, int par4, int par5)
 
void drawString (FontRenderer par1FontRenderer, String par2Str, int par3, int par4, int par5)
 
void drawTexturedModalRect (int par1, int par2, int par3, int par4, int par5, int par6)
 
void drawTexturedModelRectFromIcon (int par1, int par2, Icon par3Icon, int par4, int par5)
 

Additional Inherited Members

- Static Public Member Functions inherited from net.minecraft.client.gui.Gui
static void drawRect (int par0, int par1, int par2, int par3, int par4)
 
- Protected Member Functions inherited from net.minecraft.client.gui.Gui
void drawHorizontalLine (int par1, int par2, int par3, int par4)
 
void drawVerticalLine (int par1, int par2, int par3, int par4)
 
void drawGradientRect (int par1, int par2, int par3, int par4, int par5, int par6)
 
- Protected Attributes inherited from net.minecraft.client.gui.Gui
float zLevel = 0.0F
 

Constructor & Destructor Documentation

net.minecraft.client.gui.GuiTextField.GuiTextField ( FontRenderer  par1FontRenderer,
int  par2,
int  par3,
int  par4,
int  par5 
)

Member Function Documentation

void net.minecraft.client.gui.GuiTextField.deleteFromCursor ( int  par1)

delete the selected text, otherwsie deletes characters from either side of the cursor. params: delete num

void net.minecraft.client.gui.GuiTextField.deleteWords ( int  par1)

Deletes the specified number of words starting at the cursor position. Negative numbers will delete words left of the cursor.

void net.minecraft.client.gui.GuiTextField.drawTextBox ( )

Draws the textbox

int net.minecraft.client.gui.GuiTextField.func_73798_a ( int  par1,
int  par2,
boolean  par3 
)
int net.minecraft.client.gui.GuiTextField.getCursorPosition ( )

returns the current position of the cursor

boolean net.minecraft.client.gui.GuiTextField.getEnableBackgroundDrawing ( )

get enable drawing background and outline

int net.minecraft.client.gui.GuiTextField.getMaxStringLength ( )

returns the maximum number of character that can be contained in this textbox

int net.minecraft.client.gui.GuiTextField.getNthWordFromCursor ( int  par1)

see () params: N, position

int net.minecraft.client.gui.GuiTextField.getNthWordFromPos ( int  par1,
int  par2 
)

gets the position of the nth word. N may be negative, then it looks backwards. params: N, position

String net.minecraft.client.gui.GuiTextField.getSelectedtext ( )
Returns
returns the text between the cursor and selectionEnd
int net.minecraft.client.gui.GuiTextField.getSelectionEnd ( )

the side of the selection that is not the cursor, maye be the same as the cursor

String net.minecraft.client.gui.GuiTextField.getText ( )

Returns the text beign edited on the textbox.

boolean net.minecraft.client.gui.GuiTextField.getVisible ( )
Returns
true
if this textbox is visible
int net.minecraft.client.gui.GuiTextField.getWidth ( )

returns the width of the textbox depending on if the the box is enabled

boolean net.minecraft.client.gui.GuiTextField.isFocused ( )

getter for the focused field

void net.minecraft.client.gui.GuiTextField.mouseClicked ( int  par1,
int  par2,
int  par3 
)

Args: x, y, buttonClicked

void net.minecraft.client.gui.GuiTextField.moveCursorBy ( int  par1)

Moves the text cursor by a specified number of characters and clears the selection

void net.minecraft.client.gui.GuiTextField.setCanLoseFocus ( boolean  par1)

if true the textbox can lose focus by clicking elsewhere on the screen

void net.minecraft.client.gui.GuiTextField.setCursorPosition ( int  par1)

sets the position of the cursor to the provided index

void net.minecraft.client.gui.GuiTextField.setCursorPositionEnd ( )

sets the cursors position to after the text

void net.minecraft.client.gui.GuiTextField.setCursorPositionZero ( )

sets the cursors position to the beginning

void net.minecraft.client.gui.GuiTextField.setDisabledTextColour ( int  par1)
void net.minecraft.client.gui.GuiTextField.setEnableBackgroundDrawing ( boolean  par1)

enable drawing background and outline

void net.minecraft.client.gui.GuiTextField.setEnabled ( boolean  par1)
void net.minecraft.client.gui.GuiTextField.setFocused ( boolean  par1)

setter for the focused field

void net.minecraft.client.gui.GuiTextField.setMaxStringLength ( int  par1)
void net.minecraft.client.gui.GuiTextField.setSelectionPos ( int  par1)

Sets the position of the selection anchor (i.e. position the selection was started at)

void net.minecraft.client.gui.GuiTextField.setText ( String  par1Str)

Sets the text of the textbox.

void net.minecraft.client.gui.GuiTextField.setTextColor ( int  par1)

Sets the text colour for this textbox (disabled text will not use this colour)

void net.minecraft.client.gui.GuiTextField.setVisible ( boolean  par1)

Sets whether or not this textbox is visible

boolean net.minecraft.client.gui.GuiTextField.textboxKeyTyped ( char  par1,
int  par2 
)

Call this method from you GuiScreen to process the keys into textbox.

void net.minecraft.client.gui.GuiTextField.updateCursorCounter ( )

Increments the cursor counter

void net.minecraft.client.gui.GuiTextField.writeText ( String  par1Str)

replaces selected text, or inserts text at the position on the cursor


The documentation for this class was generated from the following file: