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);
}
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;
}
}
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;
}
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;
}
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;
}
Aggregations