use of net.minecraft.client.gui.GuiTextField in project ICBM-Classic by BuiltBrokenModding.
the class GuiCruiseLauncher method initGui.
@Override
public void initGui() {
super.initGui();
this.textFieldX = new GuiTextField(0, fontRenderer, 20, 21, 35, 12);
this.textFieldY = new GuiTextField(1, fontRenderer, 20, 37, 35, 12);
this.textFieldZ = new GuiTextField(2, fontRenderer, 20, 52, 35, 12);
this.textFieldFreq = new GuiTextField(3, fontRenderer, 70, 33, 35, 12);
this.textFieldFreq.setMaxStringLength(4);
this.textFieldX.setMaxStringLength(6);
this.textFieldZ.setMaxStringLength(6);
this.textFieldY.setMaxStringLength(6);
this.textFieldFreq.setText(this.tileEntity.getFrequency() + "");
launch_button = addButton(new GuiButton(0, guiLeft + 69, guiTop + 60, 70, 20, LanguageUtility.getLocal("gui.launcherscreen.launch")));
if (this.tileEntity.getTarget() == null) {
this.textFieldX.setText(Math.round(this.tileEntity.getPos().getX()) + "");
this.textFieldZ.setText(Math.round(this.tileEntity.getPos().getZ()) + "");
this.textFieldY.setText(Math.round(this.tileEntity.getPos().getY()) + "");
} else {
this.textFieldX.setText(Math.round(this.tileEntity.getTarget().x()) + "");
this.textFieldZ.setText(Math.round(this.tileEntity.getTarget().z()) + "");
this.textFieldY.setText(Math.round(this.tileEntity.getTarget().y()) + "");
}
}
use of net.minecraft.client.gui.GuiTextField in project pnc-repressurized by TeamPneumatic.
the class GuiSearcher method initGui.
/**
* Adds the buttons (and other controls) to the screen in question.
*/
@Override
public void initGui() {
super.initGui();
buttonList.clear();
Keyboard.enableRepeatEvents(true);
searchField = new GuiTextField(-1, fontRenderer, guiLeft + 20, guiTop + 36, 89, fontRenderer.FONT_HEIGHT);
searchField.setMaxStringLength(15);
searchField.setEnableBackgroundDrawing(true);
searchField.setVisible(true);
searchField.setFocused(true);
searchField.setTextColor(16777215);
updateCreativeSearch();
}
use of net.minecraft.client.gui.GuiTextField in project RecurrentComplex by Ivorforce.
the class TableDataSourceTweakStructuresList method suggest.
public static void suggest(GuiChat chat, String command) {
GuiTextField inputField = ReflectionHelper.getPrivateValue(GuiChat.class, chat, "inputField", "field_146415_a");
inputField.setText(command);
}
use of net.minecraft.client.gui.GuiTextField in project MorePlanets by SteveKunG.
the class GuiCelestialSelection method initGui.
@Override
public void initGui() {
this.listCelestial.clear();
this.listCelestial.addAll(GalaxyRegistry.getRegisteredPlanets().values().stream().filter(planet -> planet.getDimensionID() != 0 && planet.getDimensionID() != ConfigManagerMP.moreplanets_dimension.idDimensionSpaceNether && planet.getReachable() && planet.getTierRequirement() > 0).collect(Collectors.toList()));
this.listCelestial.addAll(GalaxyRegistry.getRegisteredMoons().values().stream().filter(moon -> moon.getReachable() && moon.getTierRequirement() > 0).collect(Collectors.toList()));
this.selectionList = new GuiListCelestialSelection(this, this.listCelestial, this.width, this.height, 48, this.height - 32, 36);
this.doneButton = this.addButton(new GuiButton(0, this.width / 2 - 28, this.height - 26, 100, 20, LangUtils.translate("gui.done")));
this.addButton(new GuiButton(1, this.width / 2 + 80, this.height - 26, 100, 20, LangUtils.translate("gui.cancel")));
this.doneButton.enabled = false;
this.addButton(this.azButton = new GuiButton(SortType.A_TO_Z.id, this.width / 2 - 183, 26, 45, 20, "A-Z"));
this.azButton.enabled = false;
this.addButton(new GuiButton(SortType.Z_TO_A.id, this.width / 2 - 136, 26, 45, 20, "Z-A"));
this.addButton(new GuiButton(SortType.TIER.id, this.width / 2 - 89, 26, 45, 20, "Tier"));
this.searchField = new GuiTextField(0, this.fontRenderer, this.width / 2 - 150, this.height - 23, 100, 14);
this.searchField.setFocused(true);
this.searchField.setCanLoseFocus(true);
}
use of net.minecraft.client.gui.GuiTextField in project Galacticraft by micdoodle8.
the class GuiSlimeling method initGui.
@Override
public void initGui() {
super.initGui();
this.buttonList.clear();
Keyboard.enableRepeatEvents(true);
int i = (this.width - this.xSize) / 2;
int j = (this.height - this.ySize) / 2;
this.stayButton = new GuiButton(0, i + 120, j + 122, 50, 20, "");
this.stayButton.enabled = this.slimeling.isOwner(this.mc.player);
this.stayButton.displayString = this.slimeling.isSitting() ? GCCoreUtil.translate("gui.slimeling.button.follow") : GCCoreUtil.translate("gui.slimeling.button.sit");
this.buttonList.add(this.stayButton);
this.nameField = new GuiTextField(0, this.fontRenderer, i + 44, j + 59, 103, 12);
this.nameField.setText(this.slimeling.getName());
this.nameField.setEnableBackgroundDrawing(false);
this.nameField.setMaxStringLength(30);
this.nameField.setFocused(this.slimeling.isOwner(this.mc.player));
this.nameField.setCanLoseFocus(false);
this.invX = i + 151;
this.invY = j + 76;
}
Aggregations