use of net.minecraft.client.gui.GuiTextField in project GregTech by GregTechCE.
the class TextFieldWidget method onPositionUpdate.
@Override
protected void onPositionUpdate() {
if (isClientSide() && textField != null) {
Position position = getPosition();
GuiTextField textField = this.textField;
textField.x = position.x;
textField.y = position.y;
}
}
use of net.minecraft.client.gui.GuiTextField in project GregTech by GregTechCE.
the class TextFieldWidget method onSizeUpdate.
@Override
protected void onSizeUpdate() {
if (isClientSide() && textField != null) {
Size size = getSize();
GuiTextField textField = this.textField;
textField.width = size.width;
textField.height = size.height;
}
}
use of net.minecraft.client.gui.GuiTextField in project ICBM-Classic by BuiltBrokenModding.
the class GuiContainerBase method newField.
protected GuiTextField newField(int id, int x, int y, int w, int h, String msg) {
GuiTextField x_field = new GuiTextField(id, Minecraft.getMinecraft().fontRenderer, x, y, w, h);
x_field.setText("" + msg);
x_field.setMaxStringLength(15);
x_field.setTextColor(16777215);
fields.add(x_field);
return x_field;
}
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.textFieldTriggerRange = new GuiTextField(0, fontRenderer, 210, 67, 30, 12);
this.textFieldTriggerRange.setMaxStringLength(3);
this.textFieldTriggerRange.setText(this.tileEntity.safetyRange + "");
this.textFieldDetectionRange = new GuiTextField(1, fontRenderer, 210, 82, 30, 12);
this.textFieldDetectionRange.setMaxStringLength(3);
this.textFieldDetectionRange.setText(this.tileEntity.alarmRange + "");
this.textFieldFrequency = new GuiTextField(2, fontRenderer, 210, 108, 30, 12);
this.textFieldFrequency.setMaxStringLength(3);
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(0, fontRenderer, 110, 37, 45, 12);
this.target_zCoord_field = new GuiTextField(1, fontRenderer, 110, 52, 45, 12);
this.target_yCoord_field = new GuiTextField(2, fontRenderer, 110, 67, 45, 12);
this.lock_height_field = new GuiTextField(3, fontRenderer, 110, 82, 45, 12);
this.target_freq_field = new GuiTextField(5, fontRenderer, 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.lock_height_field.setMaxStringLength(3);
this.target_freq_field.setText(this.tileEntity.getFrequency() + "");
this.lock_height_field.setText(this.tileEntity.lockHeight + "");
launch_button = addButton(new GuiButton(0, guiLeft + (xSize / 2) - 55, guiTop + 140, 110, 20, LanguageUtility.getLocal("gui.launcherscreen.launch")));
if (this.tileEntity.getTarget() == null) {
this.target_xCoord_field.setText(Math.round(this.tileEntity.getPos().getX()) + "");
this.target_zCoord_field.setText(Math.round(this.tileEntity.getPos().getZ()) + "");
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