TechReborn/src/main/java/techreborn/manual/pages/GettingStartedPage.java

41 lines
1.4 KiB
Java
Raw Normal View History

2016-02-25 19:25:52 +01:00
package techreborn.manual.pages;
import net.minecraft.client.gui.GuiButton;
import techreborn.items.ItemParts;
import techreborn.items.ItemPlates;
import techreborn.manual.PageCollection;
import techreborn.manual.Reference;
2016-02-26 13:56:15 +01:00
import techreborn.manual.util.ButtonUtil;
import techreborn.manual.util.GuiButtonItemTexture;
2016-02-25 19:25:52 +01:00
2016-10-08 21:46:16 +02:00
import java.awt.*;
public class GettingStartedPage extends TitledPage {
public GettingStartedPage(String name, PageCollection collection) {
2016-03-25 10:47:34 +01:00
super(name, false, collection, Reference.GETTINGSTARTED_KEY, Color.white.getRGB());
}
@Override
2016-10-08 21:46:16 +02:00
public void initGui() {
2016-03-25 10:47:34 +01:00
buttonList.clear();
ButtonUtil.addBackButton(0, width / 2 - 60, height / 2 + 64, buttonList);
buttonList.add(new GuiButtonItemTexture(1, getXMin() + 20, getYMin() + 20, 0, 46, 100, 20,
2016-10-08 21:46:16 +02:00
ItemParts.getPartByName("rubberSap"), Reference.pageNames.GETTINGRUBBER_PAGE,
ttl(Reference.GETTINGRUBBER_KEY)));
2016-03-25 10:47:34 +01:00
buttonList.add(new GuiButtonItemTexture(2, getXMin() + 20, getYMin() + 40, 0, 46, 100, 20,
2016-10-08 21:46:16 +02:00
ItemPlates.getPlateByName("iron"), Reference.pageNames.CRAFTINGPLATES_PAGE,
ttl(Reference.CRAFTINGPLATES_KEY)));
2016-03-25 10:47:34 +01:00
}
@Override
2016-10-08 21:46:16 +02:00
public void actionPerformed(GuiButton button) {
2016-03-25 10:47:34 +01:00
if (button.id == 0)
collection.changeActivePage(Reference.pageNames.CONTENTS_PAGE);
if (button.id == 1)
collection.changeActivePage(Reference.pageNames.GETTINGRUBBER_PAGE);
if (button.id == 2)
collection.changeActivePage(Reference.pageNames.CRAFTINGPLATES_PAGE);
2016-02-26 13:56:15 +01:00
2016-03-25 10:47:34 +01:00
}
2016-02-25 19:25:52 +01:00
}