use of net.minecraft.client.gui.GuiTextField in project SpringFestival by TeamCovertDragon.
the class GuiContainerRedPacket method initGui.
@Override
public void initGui() {
super.initGui();
GuiButtonImage sendRedPacket = new GuiButtonImage(0, this.guiLeft + 17, this.guiTop + 13, 25, 15, 195, 0, 0, TEXTURE_BG);
buttonList.add(sendRedPacket);
GuiButtonToggle passcodeModeToggle = new GuiButtonToggle(1, this.guiLeft + 15, this.guiTop + 49, 14, 14, false) {
@Override
public void drawButton(Minecraft mc, int mouseX, int mouseY, float partialTicks) {
if (passcodeMode) {
super.drawButton(mc, mouseX, mouseY, partialTicks);
}
}
};
passcodeModeToggle.initTextureValues(195, 17, 0, 0, TEXTURE_BG);
buttonList.add(passcodeModeToggle);
this.receiver = new GuiTextField(2, this.fontRenderer, this.guiLeft + 46 + 4, this.guiTop + 13 + 3, 133, 15);
this.receiver.setTextColor(-1);
this.receiver.setDisabledTextColour(-1);
this.receiver.setEnableBackgroundDrawing(false);
this.receiver.setCanLoseFocus(true);
this.receiver.setEnabled(true);
this.message = new GuiTextField(3, this.fontRenderer, this.guiLeft + 17 + 4, this.guiTop + 31 + 3, 162, 15);
this.message.setTextColor(-1);
this.message.setEnableBackgroundDrawing(false);
this.message.setCanLoseFocus(true);
this.message.setEnabled(true);
NBTTagCompound data = Minecraft.getMinecraft().player.getHeldItemMainhand().getTagCompound();
if (data != null) {
this.receiver.setText(data.getString("receiver_name"));
this.message.setText(data.getString("message"));
}
}
use of net.minecraft.client.gui.GuiTextField in project BloodMagic by WayofTime.
the class GuiItemRoutingNode method initGui.
@Override
public void initGui() {
super.initGui();
left = (this.width - this.xSize) / 2;
top = (this.height - this.ySize) / 2;
this.buttonList.clear();
this.buttonList.add(new GuiButton(0, left + 176, top + 14, 18, 18, "D"));
this.buttonList.add(new GuiButton(1, left + 176, top + 32, 18, 18, "U"));
this.buttonList.add(new GuiButton(2, left + 176, top + 50, 18, 18, "N"));
this.buttonList.add(new GuiButton(3, left + 176, top + 68, 18, 18, "S"));
this.buttonList.add(new GuiButton(4, left + 176, top + 86, 18, 18, "W"));
this.buttonList.add(new GuiButton(5, left + 176, top + 104, 18, 18, "E"));
this.buttonList.add(new GuiButton(6, left + 160, top + 50, 10, 18, ">"));
this.buttonList.add(new GuiButton(7, left + 132, top + 50, 10, 18, "<"));
disableDirectionalButton(inventory.currentActiveSlot);
this.textBox = new GuiTextField(0, this.fontRenderer, left + 94, top + 37, 70, 12);
this.textBox.setEnableBackgroundDrawing(false);
this.textBox.setText("");
}
use of net.minecraft.client.gui.GuiTextField in project BuildCraft by BuildCraft.
the class GuiArchitectOld method initGui.
@SuppressWarnings("unchecked")
@Override
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
optionRotate = new GuiBetterButton(0, guiLeft + 5, guiTop + 30, 79, "");
buttonList.add(optionRotate);
optionExcavate = new GuiBetterButton(1, guiLeft + 5, guiTop + 55, 79, "");
buttonList.add(optionExcavate);
optionAllowCreative = new GuiBetterButton(2, guiLeft + 5, guiTop + 80, 79, "");
optionAllowCreative.setToolTip(new ToolTip(500, new ToolTipLine(LocaleUtil.localize("tile.architect.tooltip.allowCreative.1")), new ToolTipLine(LocaleUtil.localize("tile.architect.tooltip.allowCreative.2"))));
buttonList.add(optionAllowCreative);
textField = new GuiTextField(0, this.fontRendererObj, TEXT_X, TEXT_Y, TEXT_WIDTH, TEXT_HEIGHT);
textField.setMaxStringLength(DefaultProps.MAX_NAME_SIZE);
textField.setText(architect.name);
textField.setFocused(true);
updateButtons();
}
use of net.minecraft.client.gui.GuiTextField in project BuildCraft by BuildCraft.
the class GuiReplacer method initGui.
@Override
public void initGui() {
super.initGui();
nameField = new GuiTextField(0, fontRenderer, guiLeft + 30, guiTop + 117, 138, 12);
}
use of net.minecraft.client.gui.GuiTextField in project BiomeTweaker by superckl.
the class GuiBiomeLayoutImage method initGui.
@Override
public void initGui() {
Keyboard.enableRepeatEvents(true);
this.buttonList.clear();
this.buttonList.add(new GuiButton(0, this.width / 2 - 155, this.height - 28, 150, 20, "Generate Image"));
this.buttonList.add(new GuiButton(1, this.width / 2 + 5, this.height - 28, 150, 20, I18n.format("gui.cancel")));
this.btnBypassProvider = this.addButton(new GuiButton(2, this.width / 2 - 155, 151, 150, 20, "Bypass Biome Provider: NO"));
this.btnBypassProvider.enabled = false;
this.btnMapType = this.addButton(new GuiButton(3, this.width / 2 + 5, 151, 150, 20, I18n.format("selectWorld.mapType")));
this.worldNameField = new GuiTextField(4, this.fontRenderer, this.width / 2 - 100, 60, 200, 20);
this.worldNameField.setFocused(true);
this.worldNameField.setText(this.worldName);
this.worldSeedField = new GuiTextField(5, this.fontRenderer, this.width / 2 - 100, 111, 200, 20);
this.worldSeedField.setText(this.worldSeed);
final int y = 173 + this.fontRenderer.FONT_HEIGHT + ((this.height - 28) - (173 + this.fontRenderer.FONT_HEIGHT)) / 2 - 10;
final int width = (150 - this.fontRenderer.getStringWidth("X:") - this.fontRenderer.getStringWidth("Y:") - 30) / 2;
this.radiusField = new GuiTextField(6, this.fontRenderer, this.width / 2 - 155 + this.fontRenderer.getStringWidth("Radius (chunks):") + 10, y, 150 - this.fontRenderer.getStringWidth("Radius (chunks):") - 10, 20);
this.radiusField.setValidator(Predicates.or(PredicateHelper.EMPTY_STRING, PredicateHelper.NONNEG_INT));
this.radiusField.setText(String.valueOf(this.radius));
this.xField = new GuiTextField(7, this.fontRenderer, this.width / 2 + 5 + this.fontRenderer.getStringWidth("X:") + 10, y, width, 20);
this.xField.setValidator(Predicates.or(PredicateHelper.EMPTY_STRING, PredicateHelper.INT));
this.xField.setText(String.valueOf(this.xCoord));
this.yField = new GuiTextField(8, this.fontRenderer, this.width / 2 + 5 + this.fontRenderer.getStringWidth("X:") + 10 + width + 10 + this.fontRenderer.getStringWidth("Y:") + 10, y, width, 20);
this.yField.setValidator(Predicates.or(PredicateHelper.EMPTY_STRING, PredicateHelper.INT));
this.yField.setText(String.valueOf(this.yCoord));
this.calcSaveDirName();
this.updateDisplayState();
}
Aggregations