Search in sources :

Example 81 with GuiTextField

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

the class GuiFrequency method initGui.

/** Adds the buttons (and other controls) to the screen in question. */
@Override
public void initGui() {
    super.initGui();
    this.textFieldFrequency = new GuiTextField(fontRendererObj, 80, 50, 40, 12);
    this.textFieldFrequency.setMaxStringLength(4);
    if (itemStack != null) {
        this.textFieldFrequency.setText(((IItemFrequency) this.itemStack.getItem()).getBroadCastHz(this.itemStack) + "");
    }
}
Also used : GuiTextField(net.minecraft.client.gui.GuiTextField) IItemFrequency(com.builtbroken.mc.api.items.hz.IItemFrequency)

Example 82 with GuiTextField

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

the class GuiServerFinder method initGui.

/**
 * Adds the buttons (and other controls) to the screen in question.
 */
@Override
public void initGui() {
    Keyboard.enableRepeatEvents(true);
    buttonList.clear();
    buttonList.add(new GuiButton(0, width / 2 - 100, height / 4 + 96 + 12, "Search"));
    buttonList.add(new GuiButton(1, width / 2 - 100, height / 4 + 120 + 12, "Tutorial"));
    buttonList.add(new GuiButton(2, width / 2 - 100, height / 4 + 144 + 12, "Back"));
    ipBox = new GuiTextField(0, fontRendererObj, width / 2 - 100, height / 4 + 34, 200, 20);
    ipBox.setMaxStringLength(200);
    ipBox.setFocused(true);
    maxThreadsBox = new GuiTextField(1, fontRendererObj, width / 2 - 32, height / 4 + 58, 26, 12);
    maxThreadsBox.setMaxStringLength(3);
    maxThreadsBox.setFocused(false);
    maxThreadsBox.setText(Integer.toString(WurstClient.INSTANCE.options.serverFinderThreads));
    state = ServerFinderState.NOT_RUNNING;
    WurstClient.INSTANCE.analytics.trackPageView("/multiplayer/server-finder", "Server Finder");
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 83 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project Waystones by blay09.

the class GuiEditWaystone method initGui.

@Override
public void initGui() {
    super.initGui();
    String oldText = tileWaystone.getWaystoneName();
    if (textField != null) {
        oldText = textField.getText();
    }
    textField = new GuiTextField(2, fontRenderer, width / 2 - 100, height / 2 - 20, 200, 20);
    textField.setMaxStringLength(128);
    textField.setText(oldText);
    textField.setFocused(true);
    btnDone = new GuiButton(0, width / 2, height / 2 + 10, 100, 20, I18n.format("gui.done"));
    buttonList.add(btnDone);
    chkGlobal = new GuiCheckBox(1, width / 2 - 100, height / 2 + 15, " " + I18n.format("gui.waystones:editWaystone.isGlobal"), tileWaystone.isGlobal());
    if (!WaystoneConfig.general.allowEveryoneGlobal && (!Minecraft.getMinecraft().player.capabilities.isCreativeMode)) {
        chkGlobal.visible = false;
    }
    buttonList.add(chkGlobal);
    Keyboard.enableRepeatEvents(true);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiCheckBox(net.minecraftforge.fml.client.config.GuiCheckBox) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 84 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project BuildCraft by BuildCraft.

the class GuiTester method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    int xscreen = (width - xSize) / 2;
    int yscreen = (height - ySize) / 2;
    Keyboard.enableRepeatEvents(true);
    checkBlockAndMeta = new GuiButton(0, xscreen + 5, yscreen + 30, 120, 20, "");
    checkBlockAndMeta.displayString = "Check Block and Meta";
    buttonList.add(checkBlockAndMeta);
    checkTileMethod = new GuiButton(1, xscreen + 5, yscreen + 55, 120, 20, "");
    checkTileMethod.displayString = "Check Tile Method";
    buttonList.add(checkTileMethod);
    checkTestCommand = new GuiButton(2, xscreen + 5, yscreen + 80, 120, 20, "");
    checkTestCommand.displayString = "Check Test Command";
    buttonList.add(checkTestCommand);
    cancel = new GuiButton(2, xscreen + 5, yscreen + 105, 120, 20, "");
    cancel.displayString = "Cancel";
    buttonList.add(cancel);
    textField = new GuiTextField(this.fontRendererObj, TEXT_X, TEXT_Y, TEXT_WIDTH, TEXT_HEIGHT);
    textField.setMaxStringLength(BuildCraftBuilders.MAX_BLUEPRINTS_NAME_SIZE);
    textField.setText("");
    textField.setFocused(true);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 85 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project BuildCraft by BuildCraft.

the class GuiTestCase method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    int x = (width - xSize) / 2;
    int y = (height - ySize) / 2;
    Keyboard.enableRepeatEvents(true);
    textField = new GuiTextField(this.fontRendererObj, TEXT_X, TEXT_Y, TEXT_WIDTH, TEXT_HEIGHT);
    textField.setMaxStringLength(BuildCraftBuilders.MAX_BLUEPRINTS_NAME_SIZE);
    textField.setText(testCase.testName);
    textField.setFocused(true);
    compress = new GuiButton(0, x + 5, y + 50, 120, 20, "");
    compress.displayString = "Compress";
    buttonList.add(compress);
    save = new GuiButton(0, x + 5, y + 75, 120, 20, "");
    save.displayString = "Save";
    buttonList.add(save);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) 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