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();
}
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);
}
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);
}
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);
}
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();
}
Aggregations