Search in sources :

Example 1 with GuiTextBox

use of forestry.core.gui.GuiTextBox in project ForestryMC by ForestryMC.

the class GuiLetter method initGui.

@Override
public void initGui() {
    super.initGui();
    Keyboard.enableRepeatEvents(true);
    address = new GuiTextField(0, this.fontRenderer, guiLeft + 46, guiTop + 13, 93, 13);
    IMailAddress recipient = container.getRecipient();
    if (recipient != null) {
        address.setText(recipient.getName());
    }
    text = new GuiTextBox(1, this.fontRenderer, guiLeft + 17, guiTop + 31, 122, 57);
    text.setMaxStringLength(128);
    if (!container.getText().isEmpty()) {
        text.setText(container.getText());
    }
}
Also used : IMailAddress(forestry.api.mail.IMailAddress) GuiTextBox(forestry.core.gui.GuiTextBox) GuiTextField(net.minecraft.client.gui.GuiTextField)

Aggregations

IMailAddress (forestry.api.mail.IMailAddress)1 GuiTextBox (forestry.core.gui.GuiTextBox)1 GuiTextField (net.minecraft.client.gui.GuiTextField)1