Search in sources :

Example 1 with WidgetTooltipArea

use of pneumaticCraft.client.gui.widget.WidgetTooltipArea 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)

Aggregations

GuiTextField (net.minecraft.client.gui.GuiTextField)1 GuiAnimatedStat (pneumaticCraft.client.gui.widget.GuiAnimatedStat)1 GuiCheckBox (pneumaticCraft.client.gui.widget.GuiCheckBox)1 WidgetTooltipArea (pneumaticCraft.client.gui.widget.WidgetTooltipArea)1