use of net.minecraft.client.gui.GuiTextField in project BiomesOPlenty by Glitchfiend.
the class GuiBOPPageTable method createTextField.
private GuiTextField createTextField(int xPosition, int yPosition, GuiBOPPageList.EditBoxEntry field) {
GuiTextField guitextfield = new GuiTextField(field.getFieldId(), this.mc.fontRenderer, xPosition, yPosition, 150, 20);
guitextfield.setText(field.getLabelText());
guitextfield.setGuiResponder(this.responder);
guitextfield.setVisible(field.isVisible());
guitextfield.setValidator(field.getValidator());
return guitextfield;
}
use of net.minecraft.client.gui.GuiTextField in project BiomesOPlenty by Glitchfiend.
the class GuiBOPPageTable method setup.
@Override
public void setup() {
// go through the fields in twos (so they go in 2 columns)
for (int k = 0; k < fields.length; k += 2) {
GuiBOPPageList.GuiFieldEntry fieldLeft = fields[k];
GuiBOPPageList.GuiFieldEntry fieldRight = k < fields.length - 1 ? fields[k + 1] : null;
Gui guiLeft = this.createGui(fieldLeft, 0, fieldRight == null);
Gui guiRight = this.createGui(fieldRight, 160, fieldLeft == null);
GuiBOPPageList.GuiRowEntry row = new GuiBOPPageList.GuiRowEntry(guiLeft, guiRight);
this.allRows.add(row);
if (fieldLeft != null && guiLeft != null) {
this.fieldIdToGuiMap.put(fieldLeft.getFieldId(), guiLeft);
if (guiLeft instanceof GuiTextField) {
this.allTextFieldGuis.add((GuiTextField) guiLeft);
}
}
if (fieldRight != null && guiRight != null) {
this.fieldIdToGuiMap.put(fieldRight.getFieldId(), guiRight);
if (guiRight instanceof GuiTextField) {
this.allTextFieldGuis.add((GuiTextField) guiRight);
}
}
}
this.resetRows();
}
use of net.minecraft.client.gui.GuiTextField in project ct.js by ChatTriggers.
the class ConfigString method init.
@Override
public void init() {
super.init();
updateValidDirectory(this.value);
this.textField = new GuiTextField(0, Renderer.getFontRenderer(), Renderer.screen.getWidth() / 2 - 100 + this.x, this.y + 15, 200, 20);
this.textField.setMaxStringLength(100);
this.textField.setText(getIsValidColor() + this.value);
}
use of net.minecraft.client.gui.GuiTextField in project PneumaticCraft by MineMaarten.
the class GuiPressureChamberInterface method initGui.
@Override
public void initGui() {
super.initGui();
int xStart = (width - xSize) / 2;
int yStart = (height - ySize) / 2;
statusStat = addAnimatedStat("Interface Status", new ItemStack(Blockss.pressureChamberInterface), 0xFFFFAA00, false);
filterStat = addAnimatedStat("Filter", new ItemStack(net.minecraft.init.Blocks.hopper), 0xFF005500, false);
filterStat.setTextWithoutCuttingString(getFilterText());
Rectangle buttonRect = filterStat.getButtonScaledRectangle(5, 30, 170, 20);
filterButton = new GuiButtonSpecial(1, buttonRect.x, buttonRect.y, buttonRect.width, buttonRect.height, "-");
filterStat.addWidget(filterButton);
creativeTabButton = new GuiButton(2, xStart + 91, yStart + 58, 78, 20, "-");
nameFilterField = new GuiTextField(fontRendererObj, xStart + 91, yStart + 58, 78, 10);
nameFilterField.setText(te.itemNameFilter);
buttonList.add(creativeTabButton);
if (te.filterMode != TileEntityPressureChamberInterface.EnumFilterMode.ITEM) {
if (((Slot) inventorySlots.inventorySlots.get(5)).xDisplayPosition < 1000) {
for (int i = 5; i < 14; i++) {
((Slot) inventorySlots.inventorySlots.get(i)).xDisplayPosition += 1000;
}
}
} else {
if (((Slot) inventorySlots.inventorySlots.get(5)).xDisplayPosition > 1000) {
for (int i = 5; i < 14; i++) {
((Slot) inventorySlots.inventorySlots.get(i)).xDisplayPosition -= 1000;
}
}
}
}
use of net.minecraft.client.gui.GuiTextField in project PneumaticCraft by MineMaarten.
the class GuiEntityTrackOptions method initGui.
@Override
public void initGui(IGuiScreen gui) {
gui.getButtonList().add(new GuiButton(10, 30, 128, 150, 20, "Move Stat Screen..."));
textField = new GuiTextField(gui.getFontRenderer(), 35, 60, 140, 10);
textField.setFocused(true);
if (PneumaticCraft.proxy.getPlayer() != null)
textField.setText(ItemPneumaticArmor.getEntityFilter(PneumaticCraft.proxy.getPlayer().getCurrentArmor(3)));
}
Aggregations