mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Made the achievement and config button appear right away after the tutorial
Closes #380
This commit is contained in:
parent
504835246c
commit
af7d0d2f1d
1 changed files with 17 additions and 13 deletions
|
@ -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,14 +89,6 @@ public class GuiMainPage extends GuiBooklet{
|
|||
this.quoteGuy = quoteSplit[1];
|
||||
}
|
||||
|
||||
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<String> configText = new ArrayList<String>();
|
||||
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));
|
||||
|
@ -109,6 +100,16 @@ public class GuiMainPage extends GuiBooklet{
|
|||
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);
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue