private GuiTextField text;
public void initGui()
{
this.text = new GuiTextField(this.fontRendererObj, this.width / 2 - 68, this.height/2-46, 137, 20);
text.setMaxStringLength(23);
text.setText("sample text");
this.text.setFocused(true);
}
protected void keyTyped(char par1, int par2)
{
super.keyTyped(par1, par2);
this.text.textboxKeyTyped(par1, par2);
}
public void updateScreen()
{
super.updateScreen();
this.text.updateCursorCounter();
}
public void drawScreen(int par1, int par2, float par3)
{
this.drawDefaultBackground();
this.text.drawTextBox();
super.drawScreen(par1, par2, par3);
}
protected void mouseClicked(int x, int y, int btn) {
super.mouseClicked(x, y, btn);
this.text.mouseClicked(x, y, btn);
}