Search in sources :

Example 11 with GuiAnimatedStat

use of pneumaticCraft.client.gui.widget.GuiAnimatedStat in project PneumaticCraft by MineMaarten.

the class GuiPressureModule method initGui.

@Override
public void initGui() {
    super.initGui();
    int xStart = (width - xSize) / 2;
    int yStart = (height - ySize) / 2;
    addLabel("lower", guiLeft + 10, guiTop + 30);
    addLabel("bar", guiLeft + 45, guiTop + 42);
    addLabel("higher", guiLeft + 140, guiTop + 30);
    String title = I18n.format("item." + module.getType() + ".name");
    addLabel(title, width / 2 - fontRendererObj.getStringWidth(title) / 2, guiTop + 5);
    lowerBoundField = new GuiTextField(fontRendererObj, xStart + 10, yStart + 41, 30, 10);
    lowerBoundField.setText(PneumaticCraftUtils.roundNumberTo(module.lowerBound, 1));
    higherBoundField = new GuiTextField(fontRendererObj, xStart + 140, yStart + 41, 30, 10);
    higherBoundField.setText(PneumaticCraftUtils.roundNumberTo(module.higherBound, 1));
    graphLowY = guiTop + 153;
    graphHighY = guiTop + 93;
    graphLeft = guiLeft + 22;
    graphRight = guiLeft + 172;
    addWidget(new WidgetTooltipArea(graphLeft - 20, graphHighY, 25, graphLowY - graphHighY, "gui.redstone"));
    addWidget(new WidgetTooltipArea(graphLeft, graphLowY - 5, graphRight - graphLeft, 25, "gui.threshold"));
    addWidget((IGuiWidget) new GuiAnimatedStat(this, "gui.tab.info", Textures.GUI_INFO_LOCATION, xStart, yStart + 5, 0xFF8888FF, null, true).setText("gui.tab.info.tubeModule"));
    advancedMode = new GuiCheckBox(0, guiLeft + 6, guiTop + 15, 0xFF000000, "gui.tubeModule.advancedConfig").setTooltip(I18n.format("gui.tubeModule.advancedConfig.tooltip"));
    advancedMode.checked = true;
    addWidget(advancedMode);
}
Also used : GuiCheckBox(pneumaticCraft.client.gui.widget.GuiCheckBox) WidgetTooltipArea(pneumaticCraft.client.gui.widget.WidgetTooltipArea) GuiTextField(net.minecraft.client.gui.GuiTextField) GuiAnimatedStat(pneumaticCraft.client.gui.widget.GuiAnimatedStat)

Example 12 with GuiAnimatedStat

use of pneumaticCraft.client.gui.widget.GuiAnimatedStat in project PneumaticCraft by MineMaarten.

the class GuiHelmetMainOptions method actionPerformed.

@Override
public void actionPerformed(GuiButton button) {
    switch(button.id) {
        case 10:
            FMLClientHandler.instance().getClient().thePlayer.closeScreen();
            FMLCommonHandler.instance().showGuiScreen(new GuiMoveStat(renderHandler));
            break;
        case 11:
            FMLClientHandler.instance().getClient().thePlayer.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(pneumaticCraft.client.gui.widget.GuiAnimatedStat)

Example 13 with GuiAnimatedStat

use of pneumaticCraft.client.gui.widget.GuiAnimatedStat in project PneumaticCraft by MineMaarten.

the class SearchUpgradeHandler method getAnimatedStat.

@Override
@SideOnly(Side.CLIENT)
public GuiAnimatedStat getAnimatedStat() {
    if (searchInfo == null) {
        Minecraft minecraft = Minecraft.getMinecraft();
        ScaledResolution sr = new ScaledResolution(minecraft, minecraft.displayWidth, minecraft.displayHeight);
        searchInfo = new GuiAnimatedStat(null, "Currently searching for:", new ItemStack(Itemss.machineUpgrade, 1, ItemMachineUpgrade.UPGRADE_SEARCH_DAMAGE), 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(pneumaticCraft.client.gui.widget.GuiAnimatedStat) ItemStack(net.minecraft.item.ItemStack) Minecraft(net.minecraft.client.Minecraft) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 14 with GuiAnimatedStat

use of pneumaticCraft.client.gui.widget.GuiAnimatedStat in project PneumaticCraft by MineMaarten.

the class BlockTrackUpgradeHandler method getAnimatedStat.

@Override
public GuiAnimatedStat getAnimatedStat() {
    if (blockTrackInfo == null) {
        Minecraft minecraft = Minecraft.getMinecraft();
        ScaledResolution sr = new ScaledResolution(minecraft, minecraft.displayWidth, minecraft.displayHeight);
        blockTrackInfo = new GuiAnimatedStat(null, "Current tracked blocks:", new ItemStack(Itemss.machineUpgrade, 1, ItemMachineUpgrade.UPGRADE_BLOCK_TRACKER), statX != -1 ? statX : sr.getScaledWidth() - 2, statY, 0x3000AA00, null, statLeftSided);
        blockTrackInfo.setMinDimensionsAndReset(0, 0);
    }
    return blockTrackInfo;
}
Also used : ScaledResolution(net.minecraft.client.gui.ScaledResolution) GuiAnimatedStat(pneumaticCraft.client.gui.widget.GuiAnimatedStat) ItemStack(net.minecraft.item.ItemStack) Minecraft(net.minecraft.client.Minecraft)

Example 15 with GuiAnimatedStat

use of pneumaticCraft.client.gui.widget.GuiAnimatedStat in project PneumaticCraft by MineMaarten.

the class EntityTrackUpgradeHandler method getAnimatedStat.

@Override
@SideOnly(Side.CLIENT)
public GuiAnimatedStat getAnimatedStat() {
    if (entityTrackInfo == null) {
        Minecraft minecraft = Minecraft.getMinecraft();
        ScaledResolution sr = new ScaledResolution(minecraft, minecraft.displayWidth, minecraft.displayHeight);
        entityTrackInfo = new GuiAnimatedStat(null, "Current tracked entities:", new ItemStack(Itemss.machineUpgrade, 1, ItemMachineUpgrade.UPGRADE_ENTITY_TRACKER), statX != -1 ? statX : sr.getScaledWidth() - 2, statY, 0x3000AA00, null, statLeftSided);
        entityTrackInfo.setMinDimensionsAndReset(0, 0);
    }
    return entityTrackInfo;
}
Also used : ScaledResolution(net.minecraft.client.gui.ScaledResolution) GuiAnimatedStat(pneumaticCraft.client.gui.widget.GuiAnimatedStat) ItemStack(net.minecraft.item.ItemStack) Minecraft(net.minecraft.client.Minecraft) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

GuiAnimatedStat (pneumaticCraft.client.gui.widget.GuiAnimatedStat)15 ItemStack (net.minecraft.item.ItemStack)9 Point (java.awt.Point)6 ArrayList (java.util.ArrayList)6 ScaledResolution (net.minecraft.client.gui.ScaledResolution)5 Minecraft (net.minecraft.client.Minecraft)4 IGuiAnimatedStat (pneumaticCraft.api.client.IGuiAnimatedStat)4 SideOnly (cpw.mods.fml.relauncher.SideOnly)3 GuiCheckBox (pneumaticCraft.client.gui.widget.GuiCheckBox)3 WidgetTank (pneumaticCraft.client.gui.widget.WidgetTank)3 GuiTextField (net.minecraft.client.gui.GuiTextField)1 Item (net.minecraft.item.Item)1 IGuiWidget (pneumaticCraft.client.gui.widget.IGuiWidget)1 WidgetTemperature (pneumaticCraft.client.gui.widget.WidgetTemperature)1 WidgetTooltipArea (pneumaticCraft.client.gui.widget.WidgetTooltipArea)1