Search in sources :

Example 1 with BuildCraftGui

use of buildcraft.lib.gui.BuildCraftGui in project BuildCraft by BuildCraft.

the class ElementHelpInfo method addGuiElements.

@SideOnly(Side.CLIENT)
public void addGuiElements(GuiElementContainerHelp container) {
    BuildCraftGui gui = container.gui;
    int y = 20;
    for (String key : localeKeys) {
        if (key == null) {
            y += Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT + 5;
            continue;
        }
        String localized = LocaleUtil.localize(key);
        List<String> lines = StringUtilBC.splitIntoLines(localized);
        for (String line : lines) {
            GuiElementText elemText = new GuiElementText(gui, container.offset(0, y), line, 0);
            container.add(elemText);
            y += elemText.getHeight() + 5;
        }
    }
}
Also used : BuildCraftGui(buildcraft.lib.gui.BuildCraftGui) GuiElementText(buildcraft.lib.gui.elem.GuiElementText) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

BuildCraftGui (buildcraft.lib.gui.BuildCraftGui)1 GuiElementText (buildcraft.lib.gui.elem.GuiElementText)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1