Search in sources :

Example 1 with IOptionPage

use of me.desht.pneumaticcraft.api.client.pneumaticHelmet.IOptionPage in project pnc-repressurized by TeamPneumatic.

the class GuiHelmetMainScreen method drawScreen.

@Override
public void drawScreen(int x, int y, float partialTicks) {
    drawDefaultBackground();
    IOptionPage optionPage = upgradePages.get(page);
    optionPage.drawPreButtons(x, y, partialTicks);
    super.drawScreen(x, y, partialTicks);
    optionPage.drawScreen(x, y, partialTicks);
    drawCenteredString(fontRenderer, upgradePages.get(page).getPageName(), 100, 25, 0xFFFFFFFF);
    if (optionPage.displaySettingsText())
        drawCenteredString(fontRenderer, "Settings", 100, optionPage.settingsYposition(), 0xFFFFFFFF);
}
Also used : IOptionPage(me.desht.pneumaticcraft.api.client.pneumaticHelmet.IOptionPage)

Example 2 with IOptionPage

use of me.desht.pneumaticcraft.api.client.pneumaticHelmet.IOptionPage in project pnc-repressurized by TeamPneumatic.

the class GuiHelmetMainScreen method addPages.

private void addPages() {
    for (int i = 0; i < UpgradeRenderHandlerList.instance().upgradeRenderers.size(); i++) {
        if (inInitPhase || CommonHUDHandler.getHandlerForPlayer().upgradeRenderersInserted[i]) {
            IUpgradeRenderHandler upgradeRenderHandler = UpgradeRenderHandlerList.instance().upgradeRenderers.get(i);
            IOptionPage optionPage = upgradeRenderHandler.getGuiOptionsPage();
            if (optionPage != null) {
                upgradePageNames.add(upgradeRenderHandler.getUpgradeName());
                upgradePages.add(optionPage);
            }
        }
    }
}
Also used : IUpgradeRenderHandler(me.desht.pneumaticcraft.api.client.pneumaticHelmet.IUpgradeRenderHandler) IOptionPage(me.desht.pneumaticcraft.api.client.pneumaticHelmet.IOptionPage)

Aggregations

IOptionPage (me.desht.pneumaticcraft.api.client.pneumaticHelmet.IOptionPage)2 IUpgradeRenderHandler (me.desht.pneumaticcraft.api.client.pneumaticHelmet.IUpgradeRenderHandler)1