Package pneumaticCraft.api.client

Examples of pneumaticCraft.api.client.IGuiAnimatedStat


    public void actionPerformed(IGuiWidget widget){
        if(widget instanceof IGuiAnimatedStat) {
            boolean leftSided = ((IGuiAnimatedStat)widget).isLeftSided();
            for(IGuiWidget w : widgets) {
                if(w instanceof IGuiAnimatedStat) {
                    IGuiAnimatedStat stat = (IGuiAnimatedStat)w;
                    if(widget != stat && stat.isLeftSided() == leftSided) {//when the stat is on the same side, close it.
                        stat.closeWindow();
                    }
                }
            }
        }
        NetworkHandler.sendToServer(new PacketGuiButton(te, widget.getID()));
View Full Code Here


    @Override
    @Optional.Method(modid = ModIds.NEI)
    public VisiblityData modifyVisiblity(GuiContainer gui, VisiblityData currentVisibility){
        for(IGuiWidget w : widgets) {
            if(w instanceof IGuiAnimatedStat) {
                IGuiAnimatedStat stat = (IGuiAnimatedStat)w;
                if(stat.isLeftSided()) {
                    if(stat.getWidth() > 20) {
                        currentVisibility.showUtilityButtons = false;
                        currentVisibility.showStateButtons = false;
                    }
                } else {
                    if(stat.getAffectedY() < 10) {
                        currentVisibility.showWidgets = false;
                    }
                }
            }
        }
View Full Code Here

     */
    @Override
    public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h){
        for(IGuiWidget widget : widgets) {
            if(widget instanceof IGuiAnimatedStat) {
                IGuiAnimatedStat stat = (IGuiAnimatedStat)widget;
                if(stat.getBounds().intersects(new Rectangle(x, y, w, h))) return true;
            }
        }
        return false;
    }
View Full Code Here

    public void actionPerformed(IGuiWidget widget){
        if(widget instanceof IGuiAnimatedStat) {
            boolean leftSided = ((IGuiAnimatedStat)widget).isLeftSided();
            for(IGuiWidget w : widgets) {
                if(w instanceof IGuiAnimatedStat) {
                    IGuiAnimatedStat stat = (IGuiAnimatedStat)w;
                    if(widget != stat && stat.isLeftSided() == leftSided) {//when the stat is on the same side, close it.
                        stat.closeWindow();
                    }
                }
            }
        }
    }
View Full Code Here

                }
                if(GuiKeybindCheckBox.trackedCheckboxes.get("pneumaticHelmet.upgrade.coreComponents").checked) {
                    for(int i = 0; i < UpgradeRenderHandlerList.instance().upgradeRenderers.size(); i++) {
                        IUpgradeRenderHandler upgradeRenderHandler = UpgradeRenderHandlerList.instance().upgradeRenderers.get(i);
                        if(comHudHandler.upgradeRenderersInserted[i] && GuiKeybindCheckBox.trackedCheckboxes.get("pneumaticHelmet.upgrade." + upgradeRenderHandler.getUpgradeName()).checked) {
                            IGuiAnimatedStat stat = upgradeRenderHandler.getAnimatedStat();
                            if(stat != null) {
                                stat.render(-1, -1, partialTicks);
                            }
                            upgradeRenderHandler.render2D(partialTicks, comHudHandler.helmetPressure > 0F);
                        }
                    }
                }
View Full Code Here

        }
        if(comHudHandler.ticksExisted > comHudHandler.getStartupTime() && helmetEnabled) {
            for(int i = 0; i < UpgradeRenderHandlerList.instance().upgradeRenderers.size(); i++) {
                IUpgradeRenderHandler upgradeRenderHandler = UpgradeRenderHandlerList.instance().upgradeRenderers.get(i);
                if(comHudHandler.upgradeRenderersInserted[i] && GuiKeybindCheckBox.trackedCheckboxes.get("pneumaticHelmet.upgrade." + upgradeRenderHandler.getUpgradeName()).checked) {
                    IGuiAnimatedStat stat = upgradeRenderHandler.getAnimatedStat();
                    if(stat != null) {
                        if(comHudHandler.helmetPressure > 0F) {
                            stat.openWindow();
                        } else {
                            stat.closeWindow();
                        }
                        stat.update();
                    }
                    upgradeRenderHandler.update(player, comHudHandler.rangeUpgradesInstalled);
                }
            }
        }
View Full Code Here

TOP

Related Classes of pneumaticCraft.api.client.IGuiAnimatedStat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.