use of net.minecraft.client.gui.GuiTextField in project RecurrentComplex by Ivorforce.
the class TableCellTextField method initGui.
@Override
public void initGui(GuiTable screen) {
super.initGui(screen);
Bounds bounds = bounds();
if (textField == null)
textField = new GuiTextField(0, getFontRenderer(), 0, 0, 0, 0);
updateTextFieldBounds(bounds);
textField.setMaxStringLength(maxStringLength);
textField.setText(serialize(getPropertyValue()));
textField.setVisible(!isHidden());
textField.setEnabled(enabled);
if (showsValidityState()) {
stateIndicator = new GuiValidityStateIndicator(bounds.getMaxX() - 12, bounds.getCenterY() - 5, GuiValidityStateIndicator.State.UNKNWON);
updateValidityStateIndicator();
stateIndicator.setVisible(!isHidden());
} else {
stateIndicator = null;
}
}
use of net.minecraft.client.gui.GuiTextField in project SecurityCraft by Geforce132.
the class GuiKeypadChestSetup method initGui.
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
int j = (this.height - this.height) / 2;
this.buttonList.add(this.saveAndContinueButton = new GuiButton(0, this.width / 2 - 48, this.height / 2 + 30 + 10, 100, 20, !this.flag ? "Save & continue." : "Invalid code!"));
this.textboxKeycode = new GuiTextField(this.fontRendererObj, this.width / 2 - 37, this.height / 2 - 47, 77, 12);
this.textboxKeycode.setTextColor(-1);
this.textboxKeycode.setDisabledTextColour(-1);
this.textboxKeycode.setEnableBackgroundDrawing(true);
this.textboxKeycode.setMaxStringLength(11);
this.updateButtonText();
}
use of net.minecraft.client.gui.GuiTextField in project SecurityCraft by Geforce132.
the class GuiRetinalScannerSetup method initGui.
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
int j = (this.height - this.height) / 2;
this.buttonList.add(new GuiButton(0, this.width / 2 - 48, this.height / 2 + 30 + 20, 100, 20, "Save & continue."));
this.textboxAllowedPlayers = new GuiTextField(this.fontRendererObj, this.width / 2 - 37 - 24, this.height / 2 - 23, 125, 12);
//
this.textboxAllowedPlayers.setTextColor(-1);
this.textboxAllowedPlayers.setDisabledTextColour(-1);
this.textboxAllowedPlayers.setEnableBackgroundDrawing(true);
this.textboxAllowedPlayers.setMaxStringLength(200);
}
use of net.minecraft.client.gui.GuiTextField in project SecurityCraft by Geforce132.
the class GuiSecurityCamera method initGui.
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
this.buttonList.add(new GuiButton(0, 100, 100, 100, 20, "Save."));
for (int x = 1; x <= 5; x++) {
this.textFields[x - 1] = new GuiTextField(this.fontRendererObj, this.width / 2 - 52, this.height / 2 - 67 + (x * 20), 40, 12);
this.textFields[x - 1].setTextColor(-1);
this.textFields[x - 1].setDisabledTextColour(-1);
this.textFields[x - 1].setEnableBackgroundDrawing(true);
this.textFields[x - 1].setMaxStringLength(25);
if (this.TESC.getId(x) != "") {
this.textFields[x - 1].setText(this.TESC.getId(x));
//System.out.println(x - 1);
}
}
for (int x = 1; x <= 5; x++) {
this.textFields[(x + 5) - 1] = new GuiTextField(this.fontRendererObj, this.width / 2 + 20, this.height / 2 - 67 + (x * 20), 40, 12);
this.textFields[(x + 5) - 1].setTextColor(-1);
this.textFields[(x + 5) - 1].setDisabledTextColour(-1);
this.textFields[(x + 5) - 1].setEnableBackgroundDrawing(true);
this.textFields[(x + 5) - 1].setMaxStringLength(5);
if (this.TESC.getId((x + 5)) != "") {
this.textFields[(x + 5) - 1].setText(this.TESC.getId((x + 5)));
}
}
}
use of net.minecraft.client.gui.GuiTextField in project SecurityCraft by Geforce132.
the class GuiBriefcase method initGui.
@Override
public void initGui() {
super.initGui();
for (int i = 0; i < keycodeTopButtons.length; i++) {
keycodeTopButtons[i] = new GuiButton(i, this.width / 2 - 40 + (i * 20), this.height / 2 - 52, 20, 20, UP_ARROW);
this.buttonList.add(keycodeTopButtons[i]);
}
for (int i = 0; i < keycodeBottomButtons.length; i++) {
keycodeBottomButtons[i] = new GuiButton(4 + i, this.width / 2 - 40 + (i * 20), this.height / 2, 20, 20, DOWN_ARROW);
this.buttonList.add(keycodeBottomButtons[i]);
}
continueButton = new GuiButton(8, (this.width / 2 + 42), this.height / 2 - 26, 20, 20, ">");
this.buttonList.add(continueButton);
for (int i = 0; i < keycodeTextboxes.length; i++) {
keycodeTextboxes[i] = new GuiTextField(9 + i, this.fontRendererObj, (this.width / 2 - 37) + (i * 20), this.height / 2 - 22, 14, 12);
keycodeTextboxes[i].setTextColor(-1);
keycodeTextboxes[i].setDisabledTextColour(-1);
keycodeTextboxes[i].setEnableBackgroundDrawing(true);
keycodeTextboxes[i].setMaxStringLength(1);
keycodeTextboxes[i].setText("0");
}
}
Aggregations