Search in sources :

Example 16 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project RecurrentComplex by Ivorforce.

the class TableCellTextField method initGui.

@Override
public void initGui(GuiTable screen) {
    super.initGui(screen);
    Bounds bounds = bounds();
    if (textField == null)
        textField = new GuiTextField(0, getFontRenderer(), 0, 0, 0, 0);
    updateTextFieldBounds(bounds);
    textField.setMaxStringLength(maxStringLength);
    textField.setText(serialize(getPropertyValue()));
    textField.setVisible(!isHidden());
    textField.setEnabled(enabled);
    if (showsValidityState()) {
        stateIndicator = new GuiValidityStateIndicator(bounds.getMaxX() - 12, bounds.getCenterY() - 5, GuiValidityStateIndicator.State.UNKNWON);
        updateValidityStateIndicator();
        stateIndicator.setVisible(!isHidden());
    } else {
        stateIndicator = null;
    }
}
Also used : Bounds(ivorius.reccomplex.gui.table.Bounds) GuiTextField(net.minecraft.client.gui.GuiTextField) GuiValidityStateIndicator(ivorius.reccomplex.gui.GuiValidityStateIndicator)

Example 17 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project SecurityCraft by Geforce132.

the class GuiKeypadChestSetup method initGui.

public void initGui() {
    super.initGui();
    Keyboard.enableRepeatEvents(true);
    int j = (this.height - this.height) / 2;
    this.buttonList.add(this.saveAndContinueButton = new GuiButton(0, this.width / 2 - 48, this.height / 2 + 30 + 10, 100, 20, !this.flag ? "Save & continue." : "Invalid code!"));
    this.textboxKeycode = new GuiTextField(this.fontRendererObj, this.width / 2 - 37, this.height / 2 - 47, 77, 12);
    this.textboxKeycode.setTextColor(-1);
    this.textboxKeycode.setDisabledTextColour(-1);
    this.textboxKeycode.setEnableBackgroundDrawing(true);
    this.textboxKeycode.setMaxStringLength(11);
    this.updateButtonText();
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 18 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project SecurityCraft by Geforce132.

the class GuiRetinalScannerSetup method initGui.

public void initGui() {
    super.initGui();
    Keyboard.enableRepeatEvents(true);
    int j = (this.height - this.height) / 2;
    this.buttonList.add(new GuiButton(0, this.width / 2 - 48, this.height / 2 + 30 + 20, 100, 20, "Save & continue."));
    this.textboxAllowedPlayers = new GuiTextField(this.fontRendererObj, this.width / 2 - 37 - 24, this.height / 2 - 23, 125, 12);
    //		
    this.textboxAllowedPlayers.setTextColor(-1);
    this.textboxAllowedPlayers.setDisabledTextColour(-1);
    this.textboxAllowedPlayers.setEnableBackgroundDrawing(true);
    this.textboxAllowedPlayers.setMaxStringLength(200);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 19 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project SecurityCraft by Geforce132.

the class GuiSecurityCamera method initGui.

public void initGui() {
    super.initGui();
    Keyboard.enableRepeatEvents(true);
    this.buttonList.add(new GuiButton(0, 100, 100, 100, 20, "Save."));
    for (int x = 1; x <= 5; x++) {
        this.textFields[x - 1] = new GuiTextField(this.fontRendererObj, this.width / 2 - 52, this.height / 2 - 67 + (x * 20), 40, 12);
        this.textFields[x - 1].setTextColor(-1);
        this.textFields[x - 1].setDisabledTextColour(-1);
        this.textFields[x - 1].setEnableBackgroundDrawing(true);
        this.textFields[x - 1].setMaxStringLength(25);
        if (this.TESC.getId(x) != "") {
            this.textFields[x - 1].setText(this.TESC.getId(x));
        //System.out.println(x - 1);
        }
    }
    for (int x = 1; x <= 5; x++) {
        this.textFields[(x + 5) - 1] = new GuiTextField(this.fontRendererObj, this.width / 2 + 20, this.height / 2 - 67 + (x * 20), 40, 12);
        this.textFields[(x + 5) - 1].setTextColor(-1);
        this.textFields[(x + 5) - 1].setDisabledTextColour(-1);
        this.textFields[(x + 5) - 1].setEnableBackgroundDrawing(true);
        this.textFields[(x + 5) - 1].setMaxStringLength(5);
        if (this.TESC.getId((x + 5)) != "") {
            this.textFields[(x + 5) - 1].setText(this.TESC.getId((x + 5)));
        }
    }
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 20 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project SecurityCraft by Geforce132.

the class GuiBriefcase method initGui.

@Override
public void initGui() {
    super.initGui();
    for (int i = 0; i < keycodeTopButtons.length; i++) {
        keycodeTopButtons[i] = new GuiButton(i, this.width / 2 - 40 + (i * 20), this.height / 2 - 52, 20, 20, UP_ARROW);
        this.buttonList.add(keycodeTopButtons[i]);
    }
    for (int i = 0; i < keycodeBottomButtons.length; i++) {
        keycodeBottomButtons[i] = new GuiButton(4 + i, this.width / 2 - 40 + (i * 20), this.height / 2, 20, 20, DOWN_ARROW);
        this.buttonList.add(keycodeBottomButtons[i]);
    }
    continueButton = new GuiButton(8, (this.width / 2 + 42), this.height / 2 - 26, 20, 20, ">");
    this.buttonList.add(continueButton);
    for (int i = 0; i < keycodeTextboxes.length; i++) {
        keycodeTextboxes[i] = new GuiTextField(9 + i, this.fontRendererObj, (this.width / 2 - 37) + (i * 20), this.height / 2 - 22, 14, 12);
        keycodeTextboxes[i].setTextColor(-1);
        keycodeTextboxes[i].setDisabledTextColour(-1);
        keycodeTextboxes[i].setEnableBackgroundDrawing(true);
        keycodeTextboxes[i].setMaxStringLength(1);
        keycodeTextboxes[i].setText("0");
    }
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Aggregations

GuiTextField (net.minecraft.client.gui.GuiTextField)38 GuiButton (net.minecraft.client.gui.GuiButton)16 GuiButtonVariableDims (am2.guis.controls.GuiButtonVariableDims)2 Point (java.awt.Point)2 List (java.util.List)2 ItemStack (net.minecraft.item.ItemStack)2 WidgetMode (uk.co.qmunity.lib.client.gui.widget.WidgetMode)2 AMVector2 (am2.api.math.AMVector2)1 ContainerSpellCustomization (am2.containers.ContainerSpellCustomization)1 GuiSlideControl (am2.guis.controls.GuiSlideControl)1 GuiSpellImageButton (am2.guis.controls.GuiSpellImageButton)1 GuiStatedImageButton (am2.guis.controls.GuiStatedImageButton)1 GuiButtonCheckbox (blusunrize.immersiveengineering.client.gui.elements.GuiButtonCheckbox)1 GuiButtonIE (blusunrize.immersiveengineering.client.gui.elements.GuiButtonIE)1 GuiButtonState (blusunrize.immersiveengineering.client.gui.elements.GuiButtonState)1 GuiReactiveList (blusunrize.immersiveengineering.client.gui.elements.GuiReactiveList)1 TileEntityTurretChem (blusunrize.immersiveengineering.common.blocks.metal.TileEntityTurretChem)1 TileEntityTurretGun (blusunrize.immersiveengineering.common.blocks.metal.TileEntityTurretGun)1 IItemFrequency (com.builtbroken.mc.api.items.hz.IItemFrequency)1 GuiValidityStateIndicator (ivorius.reccomplex.gui.GuiValidityStateIndicator)1