Search in sources :

Example 1 with GuiBetterButton

use of buildcraft.lib.gui.button.GuiBetterButton in project BuildCraft by BuildCraft.

the class GuiArchitectOld method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    Keyboard.enableRepeatEvents(true);
    optionRotate = new GuiBetterButton(0, guiLeft + 5, guiTop + 30, 79, "");
    buttonList.add(optionRotate);
    optionExcavate = new GuiBetterButton(1, guiLeft + 5, guiTop + 55, 79, "");
    buttonList.add(optionExcavate);
    optionAllowCreative = new GuiBetterButton(2, guiLeft + 5, guiTop + 80, 79, "");
    optionAllowCreative.setToolTip(new ToolTip(500, new ToolTipLine(LocaleUtil.localize("tile.architect.tooltip.allowCreative.1")), new ToolTipLine(LocaleUtil.localize("tile.architect.tooltip.allowCreative.2"))));
    buttonList.add(optionAllowCreative);
    textField = new GuiTextField(0, this.fontRendererObj, TEXT_X, TEXT_Y, TEXT_WIDTH, TEXT_HEIGHT);
    textField.setMaxStringLength(DefaultProps.MAX_NAME_SIZE);
    textField.setText(architect.name);
    textField.setFocused(true);
    updateButtons();
}
Also used : ToolTip(buildcraft.lib.gui.elem.ToolTip) ToolTipLine(buildcraft.core.lib.gui.tooltips.ToolTipLine) GuiBetterButton(buildcraft.lib.gui.button.GuiBetterButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 2 with GuiBetterButton

use of buildcraft.lib.gui.button.GuiBetterButton in project BuildCraft by BuildCraft.

the class GuiTools method newButtonRow.

public static void newButtonRow(List<GuiBetterButton> buttonList, int xStart, int spacing, List<? extends GuiBetterButton> buttons) {
    int pointer = 0;
    for (GuiBetterButton b : buttons) {
        b.xPosition = xStart + pointer;
        pointer += b.getWidth() + spacing;
        buttonList.add(b);
    }
}
Also used : GuiBetterButton(buildcraft.lib.gui.button.GuiBetterButton)

Example 3 with GuiBetterButton

use of buildcraft.lib.gui.button.GuiBetterButton in project BuildCraft by BuildCraft.

the class GuiFiller method initGui.

@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new GuiBetterButton(0, guiLeft + 38 - 18, guiTop + 30, 10, StandardButtonTextureSets.LEFT_BUTTON, ""));
    buttonList.add(new GuiBetterButton(1, guiLeft + 38 + 16 + 8, guiTop + 30, 10, StandardButtonTextureSets.RIGHT_BUTTON, ""));
    buttonList.add(getExcavateButton());
    slots.clear();
    for (int i = 0; i < 4; i++) {
        slots.add(new FillerParameterSlot(77 + (i * 18), 30, i));
    }
}
Also used : GuiBetterButton(buildcraft.lib.gui.button.GuiBetterButton)

Example 4 with GuiBetterButton

use of buildcraft.lib.gui.button.GuiBetterButton in project BuildCraft by BuildCraft.

the class GuiTools method newButtonRowAuto.

public static void newButtonRowAuto(List<GuiBetterButton> buttonList, int xStart, int xSize, List<? extends GuiBetterButton> buttons) {
    int buttonWidth = 0;
    for (GuiBetterButton b : buttons) {
        buttonWidth += b.getWidth();
    }
    int remaining = xSize - buttonWidth;
    int spacing = remaining / (buttons.size() + 1);
    int pointer = 0;
    for (GuiBetterButton b : buttons) {
        pointer += spacing;
        b.xPosition = xStart + pointer;
        pointer += b.getWidth();
        buttonList.add(b);
    }
}
Also used : GuiBetterButton(buildcraft.lib.gui.button.GuiBetterButton)

Example 5 with GuiBetterButton

use of buildcraft.lib.gui.button.GuiBetterButton in project BuildCraft by BuildCraft.

the class GuiZonePlan method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    tool = new GuiBetterButton(0, guiLeft + 27, guiTop + 111, 15, StandardButtonTextureSets.SMALL_BUTTON, "+");
    tool.setToolTip(new ToolTip(new ToolTipLine(LocaleUtil.localize("tip.tool.add"))));
    buttonList.add(tool);
    fsButton = new GuiBetterButton(1, guiLeft + 44, guiTop + 111, 20, StandardButtonTextureSets.SMALL_BUTTON, "FS");
    fsButton.setToolTip(new ToolTip(new ToolTipLine(LocaleUtil.localize("tip.tool.fullscreen"))));
    buttonList.add(fsButton);
    savedButtonList = buttonList;
    textField = new GuiTextField(1, this.fontRendererObj, 28, 129, 156, 12);
    textField.setMaxStringLength(DefaultProps.MAX_NAME_SIZE);
    textField.setText(zonePlan.mapName);
    textField.setFocused(true);
}
Also used : ToolTip(buildcraft.lib.gui.elem.ToolTip) ToolTipLine(buildcraft.core.lib.gui.tooltips.ToolTipLine) GuiBetterButton(buildcraft.lib.gui.button.GuiBetterButton) GuiTextField(net.minecraft.client.gui.GuiTextField)

Aggregations

GuiBetterButton (buildcraft.lib.gui.button.GuiBetterButton)5 ToolTipLine (buildcraft.core.lib.gui.tooltips.ToolTipLine)2 ToolTip (buildcraft.lib.gui.elem.ToolTip)2 GuiTextField (net.minecraft.client.gui.GuiTextField)2