use of net.minecraft.client.gui.GuiTextField in project ICBM-Classic by BuiltBrokenModding.
the class GuiFrequency method initGui.
/** Adds the buttons (and other controls) to the screen in question. */
@Override
public void initGui() {
super.initGui();
this.textFieldFrequency = new GuiTextField(fontRendererObj, 80, 50, 40, 12);
this.textFieldFrequency.setMaxStringLength(4);
if (itemStack != null) {
this.textFieldFrequency.setText(((IItemFrequency) this.itemStack.getItem()).getBroadCastHz(this.itemStack) + "");
}
}
use of net.minecraft.client.gui.GuiTextField in project Wurst-MC-1.12 by Wurst-Imperium.
the class GuiServerFinder method initGui.
/**
* Adds the buttons (and other controls) to the screen in question.
*/
@Override
public void initGui() {
Keyboard.enableRepeatEvents(true);
buttonList.clear();
buttonList.add(new GuiButton(0, width / 2 - 100, height / 4 + 96 + 12, "Search"));
buttonList.add(new GuiButton(1, width / 2 - 100, height / 4 + 120 + 12, "Tutorial"));
buttonList.add(new GuiButton(2, width / 2 - 100, height / 4 + 144 + 12, "Back"));
ipBox = new GuiTextField(0, fontRendererObj, width / 2 - 100, height / 4 + 34, 200, 20);
ipBox.setMaxStringLength(200);
ipBox.setFocused(true);
maxThreadsBox = new GuiTextField(1, fontRendererObj, width / 2 - 32, height / 4 + 58, 26, 12);
maxThreadsBox.setMaxStringLength(3);
maxThreadsBox.setFocused(false);
maxThreadsBox.setText(Integer.toString(WurstClient.INSTANCE.options.serverFinderThreads));
state = ServerFinderState.NOT_RUNNING;
WurstClient.INSTANCE.analytics.trackPageView("/multiplayer/server-finder", "Server Finder");
}
use of net.minecraft.client.gui.GuiTextField in project Waystones by blay09.
the class GuiEditWaystone method initGui.
@Override
public void initGui() {
super.initGui();
String oldText = tileWaystone.getWaystoneName();
if (textField != null) {
oldText = textField.getText();
}
textField = new GuiTextField(2, fontRenderer, width / 2 - 100, height / 2 - 20, 200, 20);
textField.setMaxStringLength(128);
textField.setText(oldText);
textField.setFocused(true);
btnDone = new GuiButton(0, width / 2, height / 2 + 10, 100, 20, I18n.format("gui.done"));
buttonList.add(btnDone);
chkGlobal = new GuiCheckBox(1, width / 2 - 100, height / 2 + 15, " " + I18n.format("gui.waystones:editWaystone.isGlobal"), tileWaystone.isGlobal());
if (!WaystoneConfig.general.allowEveryoneGlobal && (!Minecraft.getMinecraft().player.capabilities.isCreativeMode)) {
chkGlobal.visible = false;
}
buttonList.add(chkGlobal);
Keyboard.enableRepeatEvents(true);
}
use of net.minecraft.client.gui.GuiTextField in project BuildCraft by BuildCraft.
the class GuiTester method initGui.
@SuppressWarnings("unchecked")
@Override
public void initGui() {
super.initGui();
int xscreen = (width - xSize) / 2;
int yscreen = (height - ySize) / 2;
Keyboard.enableRepeatEvents(true);
checkBlockAndMeta = new GuiButton(0, xscreen + 5, yscreen + 30, 120, 20, "");
checkBlockAndMeta.displayString = "Check Block and Meta";
buttonList.add(checkBlockAndMeta);
checkTileMethod = new GuiButton(1, xscreen + 5, yscreen + 55, 120, 20, "");
checkTileMethod.displayString = "Check Tile Method";
buttonList.add(checkTileMethod);
checkTestCommand = new GuiButton(2, xscreen + 5, yscreen + 80, 120, 20, "");
checkTestCommand.displayString = "Check Test Command";
buttonList.add(checkTestCommand);
cancel = new GuiButton(2, xscreen + 5, yscreen + 105, 120, 20, "");
cancel.displayString = "Cancel";
buttonList.add(cancel);
textField = new GuiTextField(this.fontRendererObj, TEXT_X, TEXT_Y, TEXT_WIDTH, TEXT_HEIGHT);
textField.setMaxStringLength(BuildCraftBuilders.MAX_BLUEPRINTS_NAME_SIZE);
textField.setText("");
textField.setFocused(true);
}
use of net.minecraft.client.gui.GuiTextField in project BuildCraft by BuildCraft.
the class GuiTestCase method initGui.
@SuppressWarnings("unchecked")
@Override
public void initGui() {
super.initGui();
int x = (width - xSize) / 2;
int y = (height - ySize) / 2;
Keyboard.enableRepeatEvents(true);
textField = new GuiTextField(this.fontRendererObj, TEXT_X, TEXT_Y, TEXT_WIDTH, TEXT_HEIGHT);
textField.setMaxStringLength(BuildCraftBuilders.MAX_BLUEPRINTS_NAME_SIZE);
textField.setText(testCase.testName);
textField.setFocused(true);
compress = new GuiButton(0, x + 5, y + 50, 120, 20, "");
compress.displayString = "Compress";
buttonList.add(compress);
save = new GuiButton(0, x + 5, y + 75, 120, 20, "");
save.displayString = "Save";
buttonList.add(save);
}
Aggregations