use of net.minecraft.client.gui.GuiTextField in project BetterQuesting by Funwayguy.
the class JsonControlSet method Disable.
public void Disable() {
if (jsonDisplay instanceof GuiButton) {
GuiButton button = (GuiButton) jsonDisplay;
button.x = -9999;
button.y = -9999;
} else if (jsonDisplay instanceof GuiTextField) {
GuiTextField textField = (GuiTextField) jsonDisplay;
textField.x = -9999;
textField.y = -9999;
}
if (addButton != null) {
addButton.visible = false;
}
if (removeButton != null) {
removeButton.visible = false;
}
}
use of net.minecraft.client.gui.GuiTextField in project Wurst-MC-1.12 by Wurst-Imperium.
the class GuiXRayBlocksAdd method initGui.
@Override
public void initGui() {
Keyboard.enableRepeatEvents(true);
buttonList.add(addButton = new GuiButton(0, width / 2 - 100, height / 4 + 120 + 12, "Add"));
buttonList.add(new GuiButton(1, width / 2 - 100, height / 4 + 144 + 12, "Cancel"));
nameBox = new GuiTextField(0, fontRendererObj, width / 2 - 100, 80, 200, 20);
nameBox.setFocused(true);
}
use of net.minecraft.client.gui.GuiTextField in project ClaySoldiersMod by SanAndreasP.
the class GuiNexus method initGui.
@Override
public void initGui() {
super.initGui();
int l = guiLeft;
int i1 = guiTop;
GuiButton items1 = new GuiButton(0, l - 40, i1, 40, 20, "Items");
GuiButton config = new GuiButton(1, l - 40, i1 + 20, 40, 20, "Config");
items1.enabled = site != 0;
config.enabled = site != 1;
buttonList.add(items1);
buttonList.add(config);
if (site == 1) {
waveDurationSecTxt = new GuiTextField(fontRenderer, l + 10, 110 + i1, 30, 15);
waveDurationSecTxt.setText(Integer.toString(nexus.getWaveDurSec()));
spawnSoldiersMaxTxt = new GuiTextField(fontRenderer, l + 10, 110 + i1 + 20, 30, 15);
spawnSoldiersMaxTxt.setText(Integer.toString(nexus.getMaxSpwnSoldiers()));
maxLivingSoldiersTxt = new GuiTextField(fontRenderer, l + 10, 110 + i1 + 40, 30, 15);
maxLivingSoldiersTxt.setText(Integer.toString(nexus.getMaxLvngSoldiers()));
randNoneItemsTxt = new GuiTextField(fontRenderer, l + 10, 110 + i1 + 60, 30, 15);
randNoneItemsTxt.setText(Integer.toString(nexus.getChanceGetNone()));
maxHealthTxt = new GuiTextField(fontRenderer, l + 10, 110 + i1 + 80, 30, 15);
maxHealthTxt.setText(Integer.toString((int) nexus.getMaxHealth()));
GuiButton heal = new GuiButton(2, l + 115, i1 + 20, 50, 20, "Heal");
heal.enabled = (int) nexus.getHealth() < (int) nexus.getMaxHealth();
buttonList.add(heal);
GuiButton restore = new GuiButton(3, l + 115, i1 + 45, 50, 20, "Restore");
restore.enabled = nexus.isDestroyed();
buttonList.add(restore);
GuiButton rnditems = new GuiButton(4, l + 115, i1 + 70, 50, 20, "Toggle");
buttonList.add(rnditems);
}
GuiButton done = new GuiButton(5, l - 50, i1 + ySize - 20, 50, 20, "Done");
buttonList.add(done);
}
use of net.minecraft.client.gui.GuiTextField in project Random-Things by lumien231.
the class GuiOnlineDetector method initGui.
@Override
public void initGui() {
super.initGui();
usernameInput = new GuiTextField(0, this.fontRenderer, (width / 2 - xSize / 2) + 5, (height / 2), 127, 20);
usernameInput.setFocused(false);
usernameInput.setCanLoseFocus(true);
usernameInput.setText(te.getPlayerName());
}
use of net.minecraft.client.gui.GuiTextField in project Random-Things by lumien231.
the class GuiChatDetector method initGui.
@Override
public void initGui() {
super.initGui();
chatMessageInput = new GuiTextField(0, this.fontRenderer, (width / 2 - xSize / 2) + 5, (height / 2), 127, 20);
chatMessageInput.setFocused(false);
chatMessageInput.setCanLoseFocus(true);
chatMessageInput.setText(te.getChatMessage());
consumeButton = new GuiCustomButton(this, 0, te.consume(), guiLeft + 112, guiTop + 5, 20, 20, "", background, 136, 0);
this.buttonList.add(consumeButton);
}
Aggregations