Added a button to pda to open Ingame configs
This commit is contained in:
parent
fa00e77ef6
commit
834b14bc31
1 changed files with 17 additions and 13 deletions
|
@ -3,6 +3,7 @@ package techreborn.pda.pages;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import techreborn.config.TechRebornConfigGui;
|
||||||
import techreborn.init.ModBlocks;
|
import techreborn.init.ModBlocks;
|
||||||
import techreborn.init.ModItems;
|
import techreborn.init.ModItems;
|
||||||
import techreborn.lib.ModInfo;
|
import techreborn.lib.ModInfo;
|
||||||
|
@ -20,15 +21,22 @@ public class ContentsPage extends TitledPage{
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
buttonList.clear();
|
buttonList.clear();
|
||||||
buttonList.add(new GuiButtonCustomTexture(0, getXMin() + 25, getYMin() + 20, 0, 46, 60, 20, new ItemStack(ModBlocks.AlloySmelter), "INDEX", "MACHINES"));
|
buttonList.add(new GuiButtonCustomTexture(0, getXMin() + 25, getYMin() + 20, 0, 46, 80, 20, new ItemStack(ModBlocks.AlloySmelter), "INDEX", "MACHINES"));
|
||||||
buttonList.add(new GuiButtonCustomTexture(1, getXMin() + 160, getYMin() + 20, 0, 46, 60, 20, new ItemStack(ModItems.uuMatter), "INDEX", "ITEMS"));
|
buttonList.add(new GuiButtonCustomTexture(1, getXMin() + 160, getYMin() + 20, 0, 46, 80, 20, new ItemStack(ModItems.uuMatter), "INDEX", "ITEMS"));
|
||||||
buttonList.add(new GuiButtonCustomTexture(2, getXMin() + 25, getYMin() + 40, 0, 46, 60, 20, new ItemStack(ModBlocks.DieselGenerator), "INDEX", "POWER GENERATION"));
|
buttonList.add(new GuiButtonCustomTexture(2, getXMin() + 25, getYMin() + 40, 0, 46, 80, 20, new ItemStack(ModBlocks.DieselGenerator), "INDEX", "POWER GENERATION"));
|
||||||
buttonList.add(new GuiButtonCustomTexture(3, getXMin() + 160, getYMin() + 40, 0, 46, 60, 20, new ItemStack(ModItems.advancedDrill), "INDEX", "TOOLS"));
|
buttonList.add(new GuiButtonCustomTexture(3, getXMin() + 160, getYMin() + 40, 0, 46, 80, 20, new ItemStack(ModItems.advancedDrill), "INDEX", "TOOLS"));
|
||||||
buttonList.add(new GuiButtonCustomTexture(4, getXMin() + 25, getYMin() + 60, 0, 46, 60, 20, new ItemStack(ModBlocks.Aesu), "INDEX", "POWER STORAGE"));
|
buttonList.add(new GuiButtonCustomTexture(4, getXMin() + 25, getYMin() + 60, 0, 46, 80, 20, new ItemStack(ModBlocks.Aesu), "INDEX", "POWER STORAGE"));
|
||||||
buttonList.add(new GuiButtonCustomTexture(5, getXMin() + 25, getYMin() + 80, 0, 46, 60, 20, new ItemStack(ModBlocks.Aesu), "INDEX", "MULTIBLOCKS"));
|
buttonList.add(new GuiButtonCustomTexture(5, getXMin() + 25, getYMin() + 80, 0, 46, 80, 20, new ItemStack(ModBlocks.MachineCasing), "INDEX", "MULTIBLOCKS"));
|
||||||
buttonList.add(new GuiButtonCustomTexture(6, getXMin() + 160, getYMin() + 60, 0, 46, 60, 20, new ItemStack(ModItems.upgrades), "INDEX", "UPGRADES"));
|
buttonList.add(new GuiButtonCustomTexture(6, getXMin() + 160, getYMin() + 60, 0, 46, 80, 20, new ItemStack(ModItems.upgrades), "INDEX", "UPGRADES"));
|
||||||
|
|
||||||
buttonList.add(new GuiButtonCustomTexture(7, getXMin() + 160, getYMin() + 160, 0, 46, 60, 20, new ItemStack(ModItems.upgrades), "INDEX", "TECHREBORN"));
|
buttonList.add(new GuiButtonCustomTexture(7, getXMin() + 160, getYMin() + 180, 0, 46, 80, 20, new ItemStack(ModItems.lapotronicOrb), "INDEX", "Changelog"));
|
||||||
|
buttonList.add(new GuiButtonCustomTexture(8, getXMin() + 25, getYMin() + 180, 0, 46, 80, 20, new ItemStack(ModItems.lapotronicOrb), "INDEX", "Configs"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderBackgroundLayer(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
super.renderBackgroundLayer(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,10 +49,6 @@ public class ContentsPage extends TitledPage{
|
||||||
if (button.id == 5)collection.changeActivePage("MULTIBLOCKS");
|
if (button.id == 5)collection.changeActivePage("MULTIBLOCKS");
|
||||||
if (button.id == 6)collection.changeActivePage("UPGRADES");
|
if (button.id == 6)collection.changeActivePage("UPGRADES");
|
||||||
if (button.id == 7)collection.changeActivePage("VERSION");
|
if (button.id == 7)collection.changeActivePage("VERSION");
|
||||||
}
|
if (button.id == 8)mc.displayGuiScreen(new TechRebornConfigGui(this));
|
||||||
|
|
||||||
@Override
|
|
||||||
public void renderBackgroundLayer(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
|
||||||
super.renderBackgroundLayer(minecraft, offsetX, offsetY, mouseX, mouseY);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue