Search in sources :

Example 96 with GuiTextField

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;
    }
}
Also used : Position(gregtech.api.util.Position) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 97 with GuiTextField

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;
    }
}
Also used : Size(gregtech.api.util.Size) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 98 with GuiTextField

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;
}
Also used : GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 99 with GuiTextField

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));
}
Also used : GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 100 with GuiTextField

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()) + "");
    }
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Aggregations

GuiTextField (net.minecraft.client.gui.GuiTextField)130 GuiButton (net.minecraft.client.gui.GuiButton)49 GuiButtonExt (net.minecraftforge.fml.client.config.GuiButtonExt)12 GuiCheckBox (net.minecraftforge.fml.client.config.GuiCheckBox)12 HoverChecker (net.minecraftforge.fml.client.config.HoverChecker)11 ItemStack (net.minecraft.item.ItemStack)9 List (java.util.List)8 GuiButtonThemed (betterquesting.api.client.gui.controls.GuiButtonThemed)5 Collectors (java.util.stream.Collectors)4 CaveConfigGui (cavern.client.config.CaveConfigGui)3 Config (cavern.config.Config)3 ArrayListExtended (cavern.util.ArrayListExtended)3 BlockMeta (cavern.util.BlockMeta)3 CaveFilters (cavern.util.CaveFilters)3 GuiButtonExt (cpw.mods.fml.client.config.GuiButtonExt)3 Map (java.util.Map)3 GuiDropDownList (riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList)3 GuiButtonVariableDims (am2.guis.controls.GuiButtonVariableDims)2 GuiBigTextField (betterquesting.api.client.gui.controls.GuiBigTextField)2 CaveBiome (cavern.config.manager.CaveBiome)2