Search in sources :

Example 41 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project BetterQuesting by Funwayguy.

the class JsonControlSet method Disable.

public void Disable() {
    if (jsonDisplay instanceof GuiButton) {
        GuiButton button = (GuiButton) jsonDisplay;
        button.x = -9999;
        button.y = -9999;
    } else if (jsonDisplay instanceof GuiTextField) {
        GuiTextField textField = (GuiTextField) jsonDisplay;
        textField.x = -9999;
        textField.y = -9999;
    }
    if (addButton != null) {
        addButton.visible = false;
    }
    if (removeButton != null) {
        removeButton.visible = false;
    }
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 42 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project Wurst-MC-1.12 by Wurst-Imperium.

the class GuiXRayBlocksAdd method initGui.

@Override
public void initGui() {
    Keyboard.enableRepeatEvents(true);
    buttonList.add(addButton = new GuiButton(0, width / 2 - 100, height / 4 + 120 + 12, "Add"));
    buttonList.add(new GuiButton(1, width / 2 - 100, height / 4 + 144 + 12, "Cancel"));
    nameBox = new GuiTextField(0, fontRendererObj, width / 2 - 100, 80, 200, 20);
    nameBox.setFocused(true);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 43 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project ClaySoldiersMod by SanAndreasP.

the class GuiNexus method initGui.

@Override
public void initGui() {
    super.initGui();
    int l = guiLeft;
    int i1 = guiTop;
    GuiButton items1 = new GuiButton(0, l - 40, i1, 40, 20, "Items");
    GuiButton config = new GuiButton(1, l - 40, i1 + 20, 40, 20, "Config");
    items1.enabled = site != 0;
    config.enabled = site != 1;
    buttonList.add(items1);
    buttonList.add(config);
    if (site == 1) {
        waveDurationSecTxt = new GuiTextField(fontRenderer, l + 10, 110 + i1, 30, 15);
        waveDurationSecTxt.setText(Integer.toString(nexus.getWaveDurSec()));
        spawnSoldiersMaxTxt = new GuiTextField(fontRenderer, l + 10, 110 + i1 + 20, 30, 15);
        spawnSoldiersMaxTxt.setText(Integer.toString(nexus.getMaxSpwnSoldiers()));
        maxLivingSoldiersTxt = new GuiTextField(fontRenderer, l + 10, 110 + i1 + 40, 30, 15);
        maxLivingSoldiersTxt.setText(Integer.toString(nexus.getMaxLvngSoldiers()));
        randNoneItemsTxt = new GuiTextField(fontRenderer, l + 10, 110 + i1 + 60, 30, 15);
        randNoneItemsTxt.setText(Integer.toString(nexus.getChanceGetNone()));
        maxHealthTxt = new GuiTextField(fontRenderer, l + 10, 110 + i1 + 80, 30, 15);
        maxHealthTxt.setText(Integer.toString((int) nexus.getMaxHealth()));
        GuiButton heal = new GuiButton(2, l + 115, i1 + 20, 50, 20, "Heal");
        heal.enabled = (int) nexus.getHealth() < (int) nexus.getMaxHealth();
        buttonList.add(heal);
        GuiButton restore = new GuiButton(3, l + 115, i1 + 45, 50, 20, "Restore");
        restore.enabled = nexus.isDestroyed();
        buttonList.add(restore);
        GuiButton rnditems = new GuiButton(4, l + 115, i1 + 70, 50, 20, "Toggle");
        buttonList.add(rnditems);
    }
    GuiButton done = new GuiButton(5, l - 50, i1 + ySize - 20, 50, 20, "Done");
    buttonList.add(done);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 44 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project Random-Things by lumien231.

the class GuiOnlineDetector method initGui.

@Override
public void initGui() {
    super.initGui();
    usernameInput = new GuiTextField(0, this.fontRenderer, (width / 2 - xSize / 2) + 5, (height / 2), 127, 20);
    usernameInput.setFocused(false);
    usernameInput.setCanLoseFocus(true);
    usernameInput.setText(te.getPlayerName());
}
Also used : GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 45 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project Random-Things by lumien231.

the class GuiChatDetector method initGui.

@Override
public void initGui() {
    super.initGui();
    chatMessageInput = new GuiTextField(0, this.fontRenderer, (width / 2 - xSize / 2) + 5, (height / 2), 127, 20);
    chatMessageInput.setFocused(false);
    chatMessageInput.setCanLoseFocus(true);
    chatMessageInput.setText(te.getChatMessage());
    consumeButton = new GuiCustomButton(this, 0, te.consume(), guiLeft + 112, guiTop + 5, 20, 20, "", background, 136, 0);
    this.buttonList.add(consumeButton);
}
Also used : GuiCustomButton(lumien.randomthings.client.gui.elements.GuiCustomButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Aggregations

GuiTextField (net.minecraft.client.gui.GuiTextField)131 GuiButton (net.minecraft.client.gui.GuiButton)50 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