Search in sources :

Example 71 with GuiTextField

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

the class GuiKeypad 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 - 38, this.height / 2 + 30 + 10, 80, 20, "0"));
    this.buttonList.add(new GuiButton(1, this.width / 2 - 38, this.height / 2 - 60 + 10, 20, 20, "1"));
    this.buttonList.add(new GuiButton(2, this.width / 2 - 8, this.height / 2 - 60 + 10, 20, 20, "2"));
    this.buttonList.add(new GuiButton(3, this.width / 2 + 22, this.height / 2 - 60 + 10, 20, 20, "3"));
    this.buttonList.add(new GuiButton(4, this.width / 2 - 38, this.height / 2 - 30 + 10, 20, 20, "4"));
    this.buttonList.add(new GuiButton(5, this.width / 2 - 8, this.height / 2 - 30 + 10, 20, 20, "5"));
    this.buttonList.add(new GuiButton(6, this.width / 2 + 22, this.height / 2 - 30 + 10, 20, 20, "6"));
    this.buttonList.add(new GuiButton(7, this.width / 2 - 38, this.height / 2 + 10, 20, 20, "7"));
    this.buttonList.add(new GuiButton(8, this.width / 2 - 8, this.height / 2 + 10, 20, 20, "8"));
    this.buttonList.add(new GuiButton(9, this.width / 2 + 22, this.height / 2 + 10, 20, 20, "9"));
    this.buttonList.add(new GuiButton(10, this.width / 2 + 48, this.height / 2 + 30 + 10, 25, 20, "<-"));
    this.textboxKeycode = new GuiTextField(this.fontRendererObj, this.width / 2 - 37, this.height / 2 - 67, 77, 12);
    this.textboxKeycode.setTextColor(-1);
    this.textboxKeycode.setDisabledTextColour(-1);
    this.textboxKeycode.setEnableBackgroundDrawing(true);
    this.textboxKeycode.setMaxStringLength(11);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 72 with GuiTextField

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

the class GuiKeypadChest 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 - 38, this.height / 2 + 30 + 10, 80, 20, "0"));
    this.buttonList.add(new GuiButton(1, this.width / 2 - 38, this.height / 2 - 60 + 10, 20, 20, "1"));
    this.buttonList.add(new GuiButton(2, this.width / 2 - 8, this.height / 2 - 60 + 10, 20, 20, "2"));
    this.buttonList.add(new GuiButton(3, this.width / 2 + 22, this.height / 2 - 60 + 10, 20, 20, "3"));
    this.buttonList.add(new GuiButton(4, this.width / 2 - 38, this.height / 2 - 30 + 10, 20, 20, "4"));
    this.buttonList.add(new GuiButton(5, this.width / 2 - 8, this.height / 2 - 30 + 10, 20, 20, "5"));
    this.buttonList.add(new GuiButton(6, this.width / 2 + 22, this.height / 2 - 30 + 10, 20, 20, "6"));
    this.buttonList.add(new GuiButton(7, this.width / 2 - 38, this.height / 2 + 10, 20, 20, "7"));
    this.buttonList.add(new GuiButton(8, this.width / 2 - 8, this.height / 2 + 10, 20, 20, "8"));
    this.buttonList.add(new GuiButton(9, this.width / 2 + 22, this.height / 2 + 10, 20, 20, "9"));
    this.buttonList.add(new GuiButton(10, this.width / 2 + 48, this.height / 2 + 30 + 10, 25, 20, "<-"));
    this.textboxKeycode = new GuiTextField(this.fontRendererObj, this.width / 2 - 37, this.height / 2 - 67, 77, 12);
    this.textboxKeycode.setTextColor(-1);
    this.textboxKeycode.setDisabledTextColour(-1);
    this.textboxKeycode.setEnableBackgroundDrawing(true);
    this.textboxKeycode.setMaxStringLength(11);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 73 with GuiTextField

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

the class GuiKeypadSetup 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 74 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project ICBM-Classic by BuiltBrokenModding.

the class GuiCruiseLauncher method initGui.

@Override
public void initGui() {
    super.initGui();
    this.textFieldX = new GuiTextField(fontRendererObj, 20, 21, 35, 12);
    this.textFieldY = new GuiTextField(fontRendererObj, 20, 37, 35, 12);
    this.textFieldZ = new GuiTextField(fontRendererObj, 20, 52, 35, 12);
    this.textFieldFreq = new GuiTextField(fontRendererObj, 70, 33, 35, 12);
    this.textFieldFreq.setMaxStringLength(4);
    this.textFieldX.setMaxStringLength(6);
    this.textFieldZ.setMaxStringLength(6);
    this.textFieldY.setMaxStringLength(6);
    this.textFieldFreq.setText(this.tileEntity.getFrequency() + "");
    if (this.tileEntity.getTarget() == null) {
        this.textFieldX.setText(Math.round(this.tileEntity.xCoord) + "");
        this.textFieldZ.setText(Math.round(this.tileEntity.zCoord) + "");
        this.textFieldY.setText(Math.round(this.tileEntity.yCoord) + "");
    } else {
        this.textFieldX.setText(Math.round(this.tileEntity.getTarget().x()) + "");
        this.textFieldZ.setText(Math.round(this.tileEntity.getTarget().z()) + "");
        this.textFieldY.setText(Math.round(this.tileEntity.getTarget().y()) + "");
    }
}
Also used : GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 75 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.

the class HovercraftControllerGUI method keyTyped.

@Override
protected void keyTyped(char typedChar, int keyCode) throws IOException {
    boolean typed = false;
    for (GuiTextField text : textFields) {
        typed = typed || text.textboxKeyTyped(typedChar, keyCode);
    }
    if (!typed) {
        updateServer();
        super.keyTyped(typedChar, keyCode);
    }
}
Also used : GuiTextField(net.minecraft.client.gui.GuiTextField)

Aggregations

GuiTextField (net.minecraft.client.gui.GuiTextField)130 GuiButton (net.minecraft.client.gui.GuiButton)49 GuiButtonExt (net.minecraftforge.fml.client.config.GuiButtonExt)12 GuiCheckBox (net.minecraftforge.fml.client.config.GuiCheckBox)12 HoverChecker (net.minecraftforge.fml.client.config.HoverChecker)11 ItemStack (net.minecraft.item.ItemStack)9 List (java.util.List)8 GuiButtonThemed (betterquesting.api.client.gui.controls.GuiButtonThemed)5 Collectors (java.util.stream.Collectors)4 CaveConfigGui (cavern.client.config.CaveConfigGui)3 Config (cavern.config.Config)3 ArrayListExtended (cavern.util.ArrayListExtended)3 BlockMeta (cavern.util.BlockMeta)3 CaveFilters (cavern.util.CaveFilters)3 GuiButtonExt (cpw.mods.fml.client.config.GuiButtonExt)3 Map (java.util.Map)3 GuiDropDownList (riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList)3 GuiButtonVariableDims (am2.guis.controls.GuiButtonVariableDims)2 GuiBigTextField (betterquesting.api.client.gui.controls.GuiBigTextField)2 CaveBiome (cavern.config.manager.CaveBiome)2