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

40 lines
1.5 KiB
Java
Raw Normal View History

2016-02-25 19:25:52 +01:00
package techreborn.manual.pages;
import java.awt.Color;
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
public class GettingStartedPage extends TitledPage
{
public GettingStartedPage(String name, PageCollection collection)
{
super(name, false, collection, Reference.GETTINGSTARTED_KEY, Color.white.getRGB());
}
@Override
public void initGui()
{
buttonList.clear();
2016-02-26 13:56:15 +01:00
ButtonUtil.addBackButton(0, width / 2 - 60, height / 2 + 64, buttonList);
buttonList.add(new GuiButtonItemTexture(1, getXMin() + 20, getYMin() + 20, 0, 46, 100, 20, ItemParts.getPartByName("rubberSap"),
Reference.pageNames.GETTINGRUBBER_PAGE, ttl(Reference.GETTINGRUBBER_KEY)));
buttonList.add(new GuiButtonItemTexture(2, getXMin() + 20, getYMin() + 40, 0, 46, 100, 20, ItemPlates.getPlateByName("iron"),
Reference.pageNames.CRAFTINGPLATES_PAGE, ttl(Reference.CRAFTINGPLATES_KEY)));
2016-02-25 19:25:52 +01:00
}
@Override
public void actionPerformed(GuiButton button)
{
2016-02-26 13:56:15 +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-25 19:25:52 +01:00
}
}