Search in sources :

Example 1 with IOptionPage

use of pneumaticCraft.api.client.pneumaticHelmet.IOptionPage in project PneumaticCraft by MineMaarten.

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(fontRendererObj, upgradePages.get(page).getPageName(), 100, 25, 0xFFFFFFFF);
    if (optionPage.displaySettingsText())
        drawCenteredString(fontRendererObj, "Settings", 100, 115, 0xFFFFFFFF);
}
Also used : IOptionPage(pneumaticCraft.api.client.pneumaticHelmet.IOptionPage)

Example 2 with IOptionPage

use of pneumaticCraft.api.client.pneumaticHelmet.IOptionPage in project PneumaticCraft by MineMaarten.

the class GuiHelmetMainScreen method addPages.

private void addPages() {
    for (int i = 0; i < UpgradeRenderHandlerList.instance().upgradeRenderers.size(); i++) {
        if (init || 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(pneumaticCraft.api.client.pneumaticHelmet.IUpgradeRenderHandler) IOptionPage(pneumaticCraft.api.client.pneumaticHelmet.IOptionPage)

Aggregations

IOptionPage (pneumaticCraft.api.client.pneumaticHelmet.IOptionPage)2 IUpgradeRenderHandler (pneumaticCraft.api.client.pneumaticHelmet.IUpgradeRenderHandler)1