Search in sources :

Example 1 with GuiAnimatedStat

use of me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat in project pnc-repressurized by TeamPneumatic.

the class MainHelmetHandler method getAnimatedStat.

@Override
@SideOnly(Side.CLIENT)
public IGuiAnimatedStat getAnimatedStat() {
    if (powerStat == null) {
        Minecraft minecraft = Minecraft.getMinecraft();
        ScaledResolution sr = new ScaledResolution(minecraft);
        powerStat = new GuiAnimatedStat(null, "Helmet Pressure: ", "", powerStatX != -1 ? powerStatX : sr.getScaledWidth() - 2, powerStatY, 0x3000AA00, null, powerStatLeftSided);
        powerStat.setMinDimensionsAndReset(0, 0);
        powerStat.openWindow();
    }
    return powerStat;
}
Also used : ScaledResolution(net.minecraft.client.gui.ScaledResolution) IGuiAnimatedStat(me.desht.pneumaticcraft.api.client.IGuiAnimatedStat) GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat) Minecraft(net.minecraft.client.Minecraft) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 2 with GuiAnimatedStat

use of me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat in project pnc-repressurized by TeamPneumatic.

the class SearchUpgradeHandler method getAnimatedStat.

@Override
@SideOnly(Side.CLIENT)
public GuiAnimatedStat getAnimatedStat() {
    if (searchInfo == null) {
        Minecraft minecraft = Minecraft.getMinecraft();
        ScaledResolution sr = new ScaledResolution(minecraft);
        searchInfo = new GuiAnimatedStat(null, "Currently searching for:", CraftingRegistrator.getUpgrade(EnumUpgrade.SEARCH), statX != -1 ? statX : sr.getScaledWidth() - 2, statY, 0x3000AA00, null, statLeftSided);
        searchInfo.setMinDimensionsAndReset(0, 0);
    }
    return searchInfo;
}
Also used : ScaledResolution(net.minecraft.client.gui.ScaledResolution) GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat) Minecraft(net.minecraft.client.Minecraft) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 3 with GuiAnimatedStat

use of me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat in project pnc-repressurized by TeamPneumatic.

the class GuiHelmetMainOptions method actionPerformed.

@Override
public void actionPerformed(GuiButton button) {
    switch(button.id) {
        case 10:
            FMLClientHandler.instance().getClient().player.closeScreen();
            FMLCommonHandler.instance().showGuiScreen(new GuiMoveStat(renderHandler));
            break;
        case 11:
            FMLClientHandler.instance().getClient().player.closeScreen();
            renderHandler.testMessageStat = new GuiAnimatedStat(null, "Test Message, keep in mind messages can be long!", renderHandler.messagesStatX, renderHandler.messagesStatY, 0x7000AA00, null, renderHandler.messagesStatLeftSided);
            renderHandler.testMessageStat.openWindow();
            FMLCommonHandler.instance().showGuiScreen(new GuiMoveStat(renderHandler, renderHandler.testMessageStat));
            break;
        case 12:
            changingKeybinding = !changingKeybinding;
            updateKeybindingButtonText();
            break;
    }
}
Also used : GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat)

Example 4 with GuiAnimatedStat

use of me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat in project pnc-repressurized by TeamPneumatic.

the class GuiOmnidirectionalHopper method initGui.

@Override
public void initGui() {
    super.initGui();
    statusStat = addAnimatedStat("gui.tab.hopperStatus", new ItemStack(Blockss.OMNIDIRECTIONAL_HOPPER), 0xFFFFAA00, false);
    GuiAnimatedStat optionStat = addAnimatedStat("gui.tab.gasLift.mode", new ItemStack(Blocks.LEVER), 0xFFFFCC00, false);
    List<String> text = new ArrayList<String>();
    for (int i = 0; i < 4; i++) text.add("               ");
    optionStat.setTextWithoutCuttingString(text);
    GuiButtonSpecial button = new GuiButtonSpecial(1, 5, 20, 20, 20, "");
    button.setRenderStacks(new ItemStack(Items.BUCKET));
    button.setTooltipText(I18n.format("gui.tab.omnidirectionalHopper.mode.empty"));
    optionStat.addWidget(button);
    modeButtons[0] = button;
    button = new GuiButtonSpecial(2, 30, 20, 20, 20, "");
    button.setRenderStacks(new ItemStack(Items.WATER_BUCKET));
    button.setTooltipText(I18n.format("gui.tab.omnidirectionalHopper.mode.leaveItem"));
    optionStat.addWidget(button);
    modeButtons[1] = button;
}
Also used : ArrayList(java.util.ArrayList) ItemStack(net.minecraft.item.ItemStack) GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat)

Example 5 with GuiAnimatedStat

use of me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat in project pnc-repressurized by TeamPneumatic.

the class GuiPlasticMixer method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTemperature(0, guiLeft + 55, guiTop + 25, 295, 500, te.getLogic(0)));
    addWidget(new WidgetTemperature(1, guiLeft + 82, guiTop + 25, 295, 500, te.getLogic(1), PneumaticValues.PLASTIC_MIXER_MELTING_TEMP));
    addWidget(new WidgetTank(3, guiLeft + 152, guiTop + 14, te.getTank()));
    GuiAnimatedStat stat = addAnimatedStat("gui.tab.plasticMixer.plasticSelection", new ItemStack(Itemss.PLASTIC, 1, 1), 0xFF005500, false);
    List<String> text = new ArrayList<>();
    for (int i = 0; i < 12; i++) {
        text.add("                      ");
    }
    stat.setTextWithoutCuttingString(text);
    buttons = new GuiButtonSpecial[16];
    for (int x = 0; x < 4; x++) {
        for (int y = 0; y < 4; y++) {
            int index = y * 4 + x;
            ItemStack plastic = new ItemStack(Itemss.PLASTIC, 1, index);
            buttons[index] = new GuiButtonSpecial(index + 1, x * 21 + 4, y * 21 + 30, 20, 20, "").setRenderStacks(plastic).setTooltipText(plastic.getDisplayName());
            stat.addWidget(buttons[index]);
        }
    }
    stat.addWidget(lockSelection = new GuiCheckBox(17, 4, 18, 0xFF000000, "gui.plasticMixer.lockSelection").setChecked(te.lockSelection).setTooltip(I18n.format("gui.plasticMixer.lockSelection.tooltip")));
}
Also used : WidgetTemperature(me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature) ArrayList(java.util.ArrayList) GuiCheckBox(me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox) WidgetTank(me.desht.pneumaticcraft.client.gui.widget.WidgetTank) GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat) ItemStack(net.minecraft.item.ItemStack)

Aggregations

GuiAnimatedStat (me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat)12 ArrayList (java.util.ArrayList)6 ItemStack (net.minecraft.item.ItemStack)6 Minecraft (net.minecraft.client.Minecraft)4 ScaledResolution (net.minecraft.client.gui.ScaledResolution)4 GuiCheckBox (me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox)3 WidgetTank (me.desht.pneumaticcraft.client.gui.widget.WidgetTank)3 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)3 IGuiAnimatedStat (me.desht.pneumaticcraft.api.client.IGuiAnimatedStat)1 WidgetEnergy (me.desht.pneumaticcraft.client.gui.widget.WidgetEnergy)1 WidgetTemperature (me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature)1 WidgetTooltipArea (me.desht.pneumaticcraft.client.gui.widget.WidgetTooltipArea)1 GuiTextField (net.minecraft.client.gui.GuiTextField)1 Item (net.minecraft.item.Item)1 IEnergyStorage (net.minecraftforge.energy.IEnergyStorage)1