use of net.minecraft.client.gui.GuiTextField in project Railcraft by Railcraft.
the class GuiAnvil method initGui.
/**
* Adds the buttons (and other controls) to the screen in question.
*/
@Override
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
int i = (width - xSize) / 2;
int j = (height - ySize) / 2;
this.itemNameField = new GuiTextField(0, fontRendererObj, i + 62, j + 24, 103, 12);
itemNameField.setTextColor(-1);
itemNameField.setDisabledTextColour(-1);
itemNameField.setEnableBackgroundDrawing(false);
itemNameField.setMaxStringLength(40);
inventorySlots.removeListener(this);
inventorySlots.addListener(this);
}
use of net.minecraft.client.gui.GuiTextField in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class HovercraftControllerGUI method mouseClicked.
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
// super.mouseClicked(mouseX,mouseY,mouseButton);
boolean prevFocused = false;
boolean postFocused = false;
for (GuiTextField text : textFields) {
prevFocused = text.isFocused() || prevFocused;
text.mouseClicked(mouseX, mouseY, mouseButton);
postFocused = text.isFocused() || postFocused;
}
if (prevFocused && !postFocused) {
updateServer();
}
}
use of net.minecraft.client.gui.GuiTextField in project ICBM-Classic by BuiltBrokenModding.
the class GuiEMPTower method initGui.
/** Adds the buttons (and other controls) to the screen in question. */
@Override
public void initGui() {
super.initGui();
this.buttonList.clear();
this.buttonList.add(new GuiButton(0, this.width / 2 - 77, this.height / 2 - 10, 50, 20, LanguageUtility.getLocal("gui.empTower.missiles")));
this.buttonList.add(new GuiButton(1, this.width / 2 - 25, this.height / 2 - 10, 65, 20, LanguageUtility.getLocal("gui.empTower.elec")));
this.buttonList.add(new GuiButton(2, this.width / 2 + 43, this.height / 2 - 10, 35, 20, LanguageUtility.getLocal("gui.empTower.both")));
this.textFieldBanJing = new GuiTextField(fontRendererObj, 72, 28, 30, 12);
this.textFieldBanJing.setMaxStringLength(3);
this.textFieldBanJing.setText(this.tileEntity.empRadius + "");
}
use of net.minecraft.client.gui.GuiTextField in project ICBM-Classic by BuiltBrokenModding.
the class GuiRadarStation method initGui.
@Override
public void initGui() {
super.initGui();
this.textFieldSafetyZone = new GuiTextField(fontRendererObj, 210, 67, 30, 12);
this.textFieldSafetyZone.setMaxStringLength(3);
this.textFieldSafetyZone.setText(this.tileEntity.safetyRange + "");
this.textFieldAlarmRange = new GuiTextField(fontRendererObj, 210, 82, 30, 12);
this.textFieldAlarmRange.setMaxStringLength(3);
this.textFieldAlarmRange.setText(this.tileEntity.alarmRange + "");
this.textFieldFrequency = new GuiTextField(fontRendererObj, 155, 112, 50, 12);
this.textFieldFrequency.setMaxStringLength(6);
this.textFieldFrequency.setText(this.tileEntity.getFrequency() + "");
//Engine.instance.packetHandler.sendToServer(new PacketTile(this.tileEntity, -1, true));
}
use of net.minecraft.client.gui.GuiTextField in project ICBM-Classic by BuiltBrokenModding.
the class GuiLauncherScreen method initGui.
/** Adds the buttons (and other controls) to the screen in question. */
@Override
public void initGui() {
super.initGui();
this.target_xCoord_field = new GuiTextField(fontRendererObj, 110, 37, 45, 12);
this.target_zCoord_field = new GuiTextField(fontRendererObj, 110, 52, 45, 12);
this.target_yCoord_field = new GuiTextField(fontRendererObj, 110, 67, 45, 12);
this.target_height_field = new GuiTextField(fontRendererObj, 110, 82, 45, 12);
this.target_freq_field = new GuiTextField(fontRendererObj, 110, 97, 45, 12);
this.target_freq_field.setMaxStringLength(4);
this.target_xCoord_field.setMaxStringLength(6);
this.target_zCoord_field.setMaxStringLength(6);
this.target_yCoord_field.setMaxStringLength(3);
this.target_height_field.setMaxStringLength(3);
this.target_freq_field.setText(this.tileEntity.getFrequency() + "");
this.target_height_field.setText(this.tileEntity.targetHeight + "");
if (this.tileEntity.getTarget() == null) {
this.target_xCoord_field.setText(Math.round(this.tileEntity.xCoord) + "");
this.target_zCoord_field.setText(Math.round(this.tileEntity.zCoord) + "");
this.target_yCoord_field.setText("0");
} else {
this.target_xCoord_field.setText(Math.round(this.tileEntity.getTarget().x()) + "");
this.target_zCoord_field.setText(Math.round(this.tileEntity.getTarget().z()) + "");
this.target_yCoord_field.setText(Math.round(this.tileEntity.getTarget().y()) + "");
}
}
Aggregations