Search in sources :

Example 21 with GuiTextField

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

the class GuiBriefcaseSetup method initGui.

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

Example 22 with GuiTextField

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

the class GuiKeyChanger method initGui.

@Override
public void initGui() {
    super.initGui();
    Keyboard.enableRepeatEvents(true);
    buttonList.add(confirmButton = new GuiButton(0, this.width / 2 - 52, this.height / 2 + 52, 100, 20, I18n.translateToLocal("gui.universalKeyChanger.confirm")));
    confirmButton.enabled = false;
    textboxNewPasscode = new GuiTextField(0, this.fontRendererObj, this.width / 2 - 57, this.height / 2 - 47, 110, 12);
    textboxNewPasscode.setTextColor(-1);
    textboxNewPasscode.setDisabledTextColour(-1);
    textboxNewPasscode.setEnableBackgroundDrawing(true);
    textboxNewPasscode.setMaxStringLength(20);
    textboxConfirmPasscode = new GuiTextField(1, this.fontRendererObj, this.width / 2 - 57, this.height / 2 - 7, 110, 12);
    textboxConfirmPasscode.setTextColor(-1);
    textboxConfirmPasscode.setDisabledTextColour(-1);
    textboxConfirmPasscode.setEnableBackgroundDrawing(true);
    textboxConfirmPasscode.setMaxStringLength(20);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 23 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project PneumaticCraft by MineMaarten.

the class GuiAirGrateModule method initGui.

@Override
public void initGui() {
    super.initGui();
    addLabel(I18n.format("gui.entityFilter"), guiLeft + 10, guiTop + 14);
    textfield = new GuiTextField(fontRendererObj, guiLeft + 10, guiTop + 25, 160, 10);
    textfield.setText(((ModuleAirGrate) module).entityFilter);
}
Also used : GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 24 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project PneumaticCraft by MineMaarten.

the class GuiPressureModule method initGui.

@Override
public void initGui() {
    super.initGui();
    int xStart = (width - xSize) / 2;
    int yStart = (height - ySize) / 2;
    addLabel("lower", guiLeft + 10, guiTop + 30);
    addLabel("bar", guiLeft + 45, guiTop + 42);
    addLabel("higher", guiLeft + 140, guiTop + 30);
    String title = I18n.format("item." + module.getType() + ".name");
    addLabel(title, width / 2 - fontRendererObj.getStringWidth(title) / 2, guiTop + 5);
    lowerBoundField = new GuiTextField(fontRendererObj, xStart + 10, yStart + 41, 30, 10);
    lowerBoundField.setText(PneumaticCraftUtils.roundNumberTo(module.lowerBound, 1));
    higherBoundField = new GuiTextField(fontRendererObj, xStart + 140, yStart + 41, 30, 10);
    higherBoundField.setText(PneumaticCraftUtils.roundNumberTo(module.higherBound, 1));
    graphLowY = guiTop + 153;
    graphHighY = guiTop + 93;
    graphLeft = guiLeft + 22;
    graphRight = guiLeft + 172;
    addWidget(new WidgetTooltipArea(graphLeft - 20, graphHighY, 25, graphLowY - graphHighY, "gui.redstone"));
    addWidget(new WidgetTooltipArea(graphLeft, graphLowY - 5, graphRight - graphLeft, 25, "gui.threshold"));
    addWidget((IGuiWidget) new GuiAnimatedStat(this, "gui.tab.info", Textures.GUI_INFO_LOCATION, xStart, yStart + 5, 0xFF8888FF, null, true).setText("gui.tab.info.tubeModule"));
    advancedMode = new GuiCheckBox(0, guiLeft + 6, guiTop + 15, 0xFF000000, "gui.tubeModule.advancedConfig").setTooltip(I18n.format("gui.tubeModule.advancedConfig.tooltip"));
    advancedMode.checked = true;
    addWidget(advancedMode);
}
Also used : GuiCheckBox(pneumaticCraft.client.gui.widget.GuiCheckBox) WidgetTooltipArea(pneumaticCraft.client.gui.widget.WidgetTooltipArea) GuiTextField(net.minecraft.client.gui.GuiTextField) GuiAnimatedStat(pneumaticCraft.client.gui.widget.GuiAnimatedStat)

Example 25 with GuiTextField

use of net.minecraft.client.gui.GuiTextField in project PneumaticCraft by MineMaarten.

the class GuiUniversalSensor method initGui.

@Override
public void initGui() {
    super.initGui();
    int xStart = (width - xSize) / 2;
    int yStart = (height - ySize) / 2;
    sensorInfoStat = addAnimatedStat("Sensor Info", new ItemStack(Blockss.universalSensor), 0xFFFFAA00, false);
    addAnimatedStat("gui.tab.upgrades", Textures.GUI_UPGRADES_LOCATION, 0xFF0000FF, true).setText(getUpgradeText());
    nameFilterField = new GuiTextField(fontRendererObj, xStart + 70, yStart + 58, 100, 10);
    nameFilterField.setText(te.getText(0));
    //also adds the redstoneButton.
    updateButtons();
}
Also used : ItemStack(net.minecraft.item.ItemStack) GuiTextField(net.minecraft.client.gui.GuiTextField) Point(java.awt.Point)

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