use of me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat in project pnc-repressurized by TeamPneumatic.
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 - fontRenderer.getStringWidth(title) / 2, guiTop + 5);
lowerBoundField = new GuiTextField(-1, fontRenderer, xStart + 10, yStart + 41, 30, 10);
lowerBoundField.setText(PneumaticCraftUtils.roundNumberTo(module.lowerBound, 1));
higherBoundField = new GuiTextField(-1, fontRenderer, 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, 0xFF404040, "gui.tubeModule.advancedConfig").setTooltip(I18n.format("gui.tubeModule.advancedConfig.tooltip"));
advancedMode.checked = true;
addWidget(advancedMode);
}
use of me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat in project pnc-repressurized by TeamPneumatic.
the class BlockTrackUpgradeHandler method getAnimatedStat.
@Override
public GuiAnimatedStat getAnimatedStat() {
if (blockTrackInfo == null) {
Minecraft minecraft = Minecraft.getMinecraft();
ScaledResolution sr = new ScaledResolution(minecraft);
blockTrackInfo = new GuiAnimatedStat(null, "Current tracked blocks:", CraftingRegistrator.getUpgrade(EnumUpgrade.BLOCK_TRACKER), statX != -1 ? statX : sr.getScaledWidth() - 2, statY, 0x3000AA00, null, statLeftSided);
blockTrackInfo.setMinDimensionsAndReset(0, 0);
}
return blockTrackInfo;
}
Aggregations