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