Search in sources :

Example 76 with GuiTextField

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

the class HovercraftControllerGUI method initGui.

@Override
public void initGui() {
    super.initGui();
    this.mc.thePlayer.openContainer = this.inventorySlots;
    this.guiLeft = (this.width - this.xSize) / 2;
    this.guiTop = (this.height - this.ySize) / 2;
    textFields.clear();
    int fieldWidth = 40;
    int fieldHeight = 20;
    GuiTextField top = new GuiTextField(0, fontRendererObj, (width - fieldWidth) / 2 - 61, (height - fieldHeight) / 2 - 77, fieldWidth, fieldHeight);
    GuiTextField mid = new GuiTextField(0, fontRendererObj, (width - fieldWidth) / 2 - 57, (height - fieldHeight) / 2 - 49, fieldWidth, fieldHeight);
    GuiTextField bot = new GuiTextField(0, fontRendererObj, (width - fieldWidth) / 2 - 57, (height - fieldHeight) / 2 - 20, fieldWidth, fieldHeight);
    top.setEnableBackgroundDrawing(false);
    mid.setEnableBackgroundDrawing(false);
    bot.setEnableBackgroundDrawing(false);
    textFields.add(top);
    textFields.add(mid);
    textFields.add(bot);
    updateTextFields();
// buttonList.add(new GuiButton(1, width/2-100, height/2-24, "Bastard button"));
}
Also used : GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 77 with GuiTextField

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

the class GuiBriefcase method drawScreen.

@Override
public void drawScreen(int par1, int par2, float par3) {
    super.drawScreen(par1, par2, par3);
    GL11.glDisable(GL11.GL_LIGHTING);
    for (GuiTextField textfield : keycodeTextboxes) textfield.drawTextBox();
}
Also used : GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 78 with GuiTextField

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

the class GuiCheckPassword method initGui.

@Override
public void initGui() {
    super.initGui();
    Keyboard.enableRepeatEvents(true);
    buttonList.add(new GuiButton(0, width / 2 - 38, height / 2 + 30 + 10, 80, 20, "0"));
    buttonList.add(new GuiButton(1, width / 2 - 38, height / 2 - 60 + 10, 20, 20, "1"));
    buttonList.add(new GuiButton(2, width / 2 - 8, height / 2 - 60 + 10, 20, 20, "2"));
    buttonList.add(new GuiButton(3, width / 2 + 22, height / 2 - 60 + 10, 20, 20, "3"));
    buttonList.add(new GuiButton(4, width / 2 - 38, height / 2 - 30 + 10, 20, 20, "4"));
    buttonList.add(new GuiButton(5, width / 2 - 8, height / 2 - 30 + 10, 20, 20, "5"));
    buttonList.add(new GuiButton(6, width / 2 + 22, height / 2 - 30 + 10, 20, 20, "6"));
    buttonList.add(new GuiButton(7, width / 2 - 38, height / 2 + 10, 20, 20, "7"));
    buttonList.add(new GuiButton(8, width / 2 - 8, height / 2 + 10, 20, 20, "8"));
    buttonList.add(new GuiButton(9, width / 2 + 22, height / 2 + 10, 20, 20, "9"));
    buttonList.add(new GuiButton(10, width / 2 + 48, height / 2 + 30 + 10, 25, 20, "<-"));
    keycodeTextbox = new GuiTextField(11, fontRendererObj, width / 2 - 37, height / 2 - 67, 77, 12);
    keycodeTextbox.setTextColor(-1);
    keycodeTextbox.setDisabledTextColour(-1);
    keycodeTextbox.setEnableBackgroundDrawing(true);
    keycodeTextbox.setMaxStringLength(11);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 79 with GuiTextField

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

the class GuiSetPassword method initGui.

@Override
public void initGui() {
    super.initGui();
    Keyboard.enableRepeatEvents(true);
    buttonList.add(saveAndContinueButton = new GuiButton(0, width / 2 - 48, height / 2 + 30 + 10, 100, 20, !flag ? StatCollector.translateToLocal("gui.keycardSetup.save") : StatCollector.translateToLocal("gui.password.invalidCode")));
    keycodeTextbox = new GuiTextField(1, fontRendererObj, width / 2 - 37, height / 2 - 47, 77, 12);
    keycodeTextbox.setTextColor(-1);
    keycodeTextbox.setDisabledTextColour(-1);
    keycodeTextbox.setEnableBackgroundDrawing(true);
    keycodeTextbox.setMaxStringLength(11);
    updateButtonText();
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 80 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project MorePlanets by SteveKunG.

the class GuiGetItemName method initGui.

@Override
public void initGui() {
    this.textField = new GuiTextField(0, this.fontRenderer, this.width / 2 - 150, 50, 300, 20);
    this.textField.setMaxStringLength(Integer.MAX_VALUE);
    if (!this.mc.player.getHeldItemMainhand().isEmpty()) {
        this.textField.setText(this.mc.player.getHeldItemMainhand().getDisplayName());
        GuiScreen.setClipboardString(this.mc.player.getHeldItemMainhand().getDisplayName());
    }
}
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