use of net.minecraftforge.fml.client.config.GuiButtonExt in project Minestuck by mraof.
the class GuiSburbMachine method initGui.
@Override
public void initGui() {
super.initGui();
if (!te.isAutomatic()) {
goButton = new GuiButtonExt(1, (width - xSize) / 2 + goX, (height - ySize) / 2 + goY, 30, 12, te.overrideStop ? "STOP" : "GO");
buttonList.add(goButton);
}
}
use of net.minecraftforge.fml.client.config.GuiButtonExt in project Minestuck by mraof.
the class GuiDataChecker method initGui.
@Override
public void initGui() {
int xOffset = (width - GUI_WIDTH) / 2;
int yOffset = (height - GUI_HEIGHT) / 2;
for (int i = 0; i < 5; i++) {
GuiButton button = new GuiButton(i, xOffset + 5, yOffset + LIST_Y + i * 22, 180, 20, "");
buttons[i] = button;
this.buttonList.add(button);
}
returnButton = new GuiButtonExt(5, xOffset + GUI_WIDTH - 25, yOffset + 5, 18, 18, "");
this.buttonList.add(returnButton);
refreshButton = new GuiButtonExt(6, xOffset + GUI_WIDTH - 45, yOffset + 5, 18, 18, "");
this.buttonList.add(refreshButton);
if (activeComponent == null)
MinestuckChannelHandler.sendToServer(MinestuckPacket.makePacket(MinestuckPacket.Type.DATA_CHECKER));
componentChanged();
}
use of net.minecraftforge.fml.client.config.GuiButtonExt in project Cavern2 by kegare.
the class GuiRegeneration method initGui.
@Override
public void initGui() {
if (regenButton == null) {
regenButton = new GuiButtonExt(0, 0, 0, I18n.format("cavern.regeneration.gui.regenerate"));
}
regenButton.x = width / 2 - 100;
regenButton.y = height / 4 + regenButton.height + 65;
if (cancelButton == null) {
cancelButton = new GuiButtonExt(1, 0, 0, I18n.format("gui.cancel"));
}
cancelButton.x = regenButton.x;
cancelButton.y = regenButton.y + regenButton.height + 5;
if (backupCheckBox == null) {
backupCheckBox = new GuiCheckBox(2, 10, 0, I18n.format("cavern.regeneration.gui.backup"), backup);
}
backupCheckBox.y = height - 20;
if (cavernCheckBox == null) {
cavernCheckBox = new GuiCheckBox(3, 10, 8, I18n.format("dimension.cavern.name"), dimensions.contains(CaveDimensions.CAVERN));
}
if (CaveDimensions.CAVERN == null) {
cavernCheckBox.enabled = false;
cavernCheckBox.setIsChecked(false);
}
GuiButton before = cavernCheckBox;
if (hugeCavernCheckBox == null) {
hugeCavernCheckBox = new GuiCheckBox(4, 10, before.y + before.height + 5, I18n.format("dimension.hugeCavern.name"), dimensions.contains(CaveDimensions.HUGE_CAVERN));
}
if (CaveDimensions.HUGE_CAVERN == null) {
hugeCavernCheckBox.enabled = false;
hugeCavernCheckBox.setIsChecked(false);
}
before = hugeCavernCheckBox;
if (aquaCavernCheckBox == null) {
aquaCavernCheckBox = new GuiCheckBox(5, 10, before.y + before.height + 5, I18n.format("dimension.aquaCavern.name"), dimensions.contains(CaveDimensions.AQUA_CAVERN));
}
if (CaveDimensions.AQUA_CAVERN == null) {
aquaCavernCheckBox.enabled = false;
aquaCavernCheckBox.setIsChecked(false);
}
before = aquaCavernCheckBox;
String mirage = CaveItems.MIRAGE_BOOK.getUnlocalizedName();
if (cavelandCheckBox == null) {
cavelandCheckBox = new GuiCheckBox(6, 10, before.y + before.height + 5, I18n.format(mirage + ".caveland.name"), dimensions.contains(CaveDimensions.CAVELAND));
}
if (CaveDimensions.CAVELAND == null) {
cavelandCheckBox.enabled = false;
cavelandCheckBox.setIsChecked(false);
}
before = cavelandCheckBox;
if (caveniaCheckBox == null) {
caveniaCheckBox = new GuiCheckBox(7, 10, before.y + before.height + 5, I18n.format(mirage + ".cavenia.name"), dimensions.contains(CaveDimensions.CAVENIA));
}
if (CaveDimensions.CAVENIA == null) {
caveniaCheckBox.enabled = false;
caveniaCheckBox.setIsChecked(false);
}
before = caveniaCheckBox;
if (frostMountainsCheckBox == null) {
frostMountainsCheckBox = new GuiCheckBox(8, 10, before.y + before.height + 5, I18n.format(mirage + ".frostMountains.name"), dimensions.contains(CaveDimensions.FROST_MOUNTAINS));
}
if (CaveDimensions.FROST_MOUNTAINS == null) {
frostMountainsCheckBox.enabled = false;
frostMountainsCheckBox.setIsChecked(false);
}
before = frostMountainsCheckBox;
if (wideDesertCheckBox == null) {
wideDesertCheckBox = new GuiCheckBox(9, 10, before.y + before.height + 5, I18n.format(mirage + ".wideDesert.name"), dimensions.contains(CaveDimensions.WIDE_DESERT));
}
if (CaveDimensions.WIDE_DESERT == null) {
wideDesertCheckBox.enabled = false;
wideDesertCheckBox.setIsChecked(false);
}
before = wideDesertCheckBox;
if (theVoidCheckBox == null) {
theVoidCheckBox = new GuiCheckBox(10, 10, before.y + before.height + 5, I18n.format(mirage + ".theVoid.name"), dimensions.contains(CaveDimensions.THE_VOID));
}
if (CaveDimensions.THE_VOID == null) {
theVoidCheckBox.enabled = false;
theVoidCheckBox.setIsChecked(false);
}
before = theVoidCheckBox;
if (darkForestCheckBox == null) {
darkForestCheckBox = new GuiCheckBox(11, 10, before.y + before.height + 5, I18n.format(mirage + ".darkForest.name"), dimensions.contains(CaveDimensions.DARK_FOREST));
}
if (CaveDimensions.DARK_FOREST == null) {
darkForestCheckBox.enabled = false;
darkForestCheckBox.setIsChecked(false);
}
before = darkForestCheckBox;
if (crownCliffsCheckBox == null) {
crownCliffsCheckBox = new GuiCheckBox(12, 10, before.y + before.height + 5, I18n.format(mirage + ".crownCliffs.name"), dimensions.contains(CaveDimensions.CROWN_CLIFFS));
}
if (CaveDimensions.CROWN_CLIFFS == null) {
crownCliffsCheckBox.enabled = false;
crownCliffsCheckBox.setIsChecked(false);
}
before = crownCliffsCheckBox;
buttonList.clear();
buttonList.add(regenButton);
buttonList.add(cancelButton);
buttonList.add(backupCheckBox);
buttonList.add(cavernCheckBox);
buttonList.add(hugeCavernCheckBox);
buttonList.add(aquaCavernCheckBox);
buttonList.add(cavelandCheckBox);
buttonList.add(caveniaCheckBox);
buttonList.add(frostMountainsCheckBox);
buttonList.add(wideDesertCheckBox);
buttonList.add(theVoidCheckBox);
buttonList.add(darkForestCheckBox);
buttonList.add(crownCliffsCheckBox);
if (backupHoverChecker == null) {
backupHoverChecker = new HoverChecker(backupCheckBox, 800);
}
}
use of net.minecraftforge.fml.client.config.GuiButtonExt in project Cavern2 by kegare.
the class GuiMiningRecords method initGui.
@Override
public void initGui() {
if (recordList == null) {
recordList = new RecordList();
}
recordList.setDimensions(width, height, 32, height - 28);
if (doneButton == null) {
doneButton = new GuiButtonExt(0, 0, 0, 145, 20, I18n.format("gui.done"));
}
doneButton.x = width / 2 + 10;
doneButton.y = height - doneButton.height - 4;
if (detailInfo == null) {
detailInfo = new GuiCheckBox(1, 0, 12, I18n.format(Config.LANG_KEY + "detail"), true);
}
detailInfo.setIsChecked(CaveConfigGui.detailInfo);
detailInfo.x = width / 2 + 95;
buttonList.clear();
buttonList.add(doneButton);
buttonList.add(detailInfo);
detailHoverChecker = new HoverChecker(detailInfo, 800);
selectedHoverChecker = new HoverChecker(0, 20, 0, 100, 800);
}
use of net.minecraftforge.fml.client.config.GuiButtonExt in project Cavern2 by kegare.
the class GuiSelectBiome method initGui.
@Override
public void initGui() {
if (biomeList == null) {
biomeList = new BiomeList();
}
biomeList.setDimensions(width, height, 32, height - 28);
if (doneButton == null) {
doneButton = new GuiButtonExt(0, 0, 0, 145, 20, I18n.format("gui.done"));
}
doneButton.x = width / 2 + 10;
doneButton.y = height - doneButton.height - 4;
if (detailInfo == null) {
detailInfo = new GuiCheckBox(1, 0, 5, I18n.format(Config.LANG_KEY + "detail"), true);
}
detailInfo.setIsChecked(CaveConfigGui.detailInfo);
detailInfo.x = width / 2 + 95;
if (instantFilter == null) {
instantFilter = new GuiCheckBox(2, 0, detailInfo.y + detailInfo.height + 2, I18n.format(Config.LANG_KEY + "instant"), true);
}
instantFilter.setIsChecked(CaveConfigGui.instantFilter);
instantFilter.x = detailInfo.x;
buttonList.clear();
buttonList.add(doneButton);
buttonList.add(detailInfo);
buttonList.add(instantFilter);
if (filterTextField == null) {
filterTextField = new GuiTextField(0, fontRenderer, 0, 0, 150, 16);
filterTextField.setMaxStringLength(100);
}
filterTextField.x = width / 2 - filterTextField.width - 5;
filterTextField.y = height - filterTextField.height - 6;
selectedHoverChecker = new HoverChecker(0, 20, 0, 100, 800);
detailHoverChecker = new HoverChecker(detailInfo, 800);
instantHoverChecker = new HoverChecker(instantFilter, 800);
}
Aggregations