diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiMainPage.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiMainPage.java index dd42dee86..9c023c888 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiMainPage.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiMainPage.java @@ -34,7 +34,6 @@ import net.minecraftforge.fml.relauncher.SideOnly; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; @SideOnly(Side.CLIENT) @@ -90,25 +89,27 @@ public class GuiMainPage extends GuiBooklet{ this.quoteGuy = quoteSplit[1]; } + List configText = new ArrayList(); + configText.add(TextFormatting.GOLD+"Open Config GUI"); + configText.addAll(this.fontRendererObj.listFormattedStringToWidth("Press this to configure "+ModUtil.NAME+" in-game. \nSome changes will require a game restart!", 200)); + this.configButton = new TexturedButton(RES_LOC_GADGETS, -388, this.guiLeft+16, this.guiTop+this.ySize-30, 188, 14, 16, 16, configText); + this.buttonList.add(this.configButton); + + List achievementText = new ArrayList(); + achievementText.add(TextFormatting.GOLD+"Open Achievements"); + achievementText.addAll(this.fontRendererObj.listFormattedStringToWidth("Press this to open the "+ModUtil.NAME+" Achievements.", 200)); + this.achievementButton = new TexturedButton(RES_LOC_GADGETS, -389, this.guiLeft+36, this.guiTop+this.ySize-30, 204, 14, 16, 16, achievementText); + this.buttonList.add(this.achievementButton); + PlayerSave data = PlayerData.getDataFromPlayer(this.mc.thePlayer); if(!data.didBookTutorial){ this.showTutorial = true; this.tutorialButton = new GuiButton(666666, this.guiLeft+140/2-50, this.guiTop+146, 100, 20, "Please click me <3"); this.buttonList.add(this.tutorialButton); - } - else{ - List configText = new ArrayList(); - configText.add(TextFormatting.GOLD+"Open Config GUI"); - configText.addAll(this.fontRendererObj.listFormattedStringToWidth("Press this to configure "+ModUtil.NAME+" in-game. \nSome changes will require a game restart!", 200)); - this.configButton = new TexturedButton(RES_LOC_GADGETS, -388, this.guiLeft+16, this.guiTop+this.ySize-30, 188, 14, 16, 16, configText); - this.buttonList.add(this.configButton); - List achievementText = new ArrayList(); - achievementText.add(TextFormatting.GOLD+"Open Achievements"); - achievementText.addAll(this.fontRendererObj.listFormattedStringToWidth("Press this to open the "+ModUtil.NAME+" Achievements.", 200)); - this.achievementButton = new TexturedButton(RES_LOC_GADGETS, -389, this.guiLeft+36, this.guiTop+this.ySize-30, 204, 14, 16, 16, achievementText); - this.buttonList.add(this.achievementButton); + this.configButton.visible = false; + this.achievementButton.visible = false; } for(int i = 0; i < BUTTONS_PER_PAGE; i++){ @@ -150,6 +151,9 @@ public class GuiMainPage extends GuiBooklet{ this.showTutorial = false; this.tutorialButton.visible = false; + this.configButton.visible = true; + this.achievementButton.visible = true; + PlayerSave data = PlayerData.getDataFromPlayer(this.mc.thePlayer); data.didBookTutorial = true; PacketHandlerHelper.sendPlayerDataPacket(this.mc.thePlayer, true, false);