Package mods.railcraft.client.gui.buttons

Examples of mods.railcraft.client.gui.buttons.GuiBetterButton


        super.initGui();
        buttonList.clear();
        int w = (width - xSize) / 2;
        int h = (height - ySize) / 2;

        buttonList.add(new GuiBetterButton(0, w + 118, h + 64, 10, StandardButtonTextureSets.LEFT_BUTTON, ""));
        buttonList.add(new GuiBetterButton(1, w + 156, h + 64, 10, StandardButtonTextureSets.RIGHT_BUTTON, ""));

        GuiBetterButton[] dice = new GuiBetterButton[3];

        ToolTip tip = ToolTip.buildToolTip("railcraft.gui.trade.station.dice.tip");
        tip.get(0).format = EnumChatFormatting.YELLOW;

        for (int b = 0; b < 3; b++) {
            dice[b] = new GuiBetterButton(2 + b, w + 93, h + 24 + 21 * b, 16, StandardButtonTextureSets.DICE_BUTTON, "");
            dice[b].setToolTip(tip);
            buttonList.add(dice[b]);
        }

    }
View Full Code Here


                }
            }
            for (Object button : buttonList) {
                if (!(button instanceof GuiBetterButton))
                    continue;
                GuiBetterButton betterButton = (GuiBetterButton) button;
                if (!betterButton.visible)
                    continue;
                ToolTip tips = betterButton.getToolTip();
                if (tips == null)
                    continue;
                boolean mouseOver = betterButton.isMouseOverButton(mouseX, mouseY);
                tips.onTick(mouseOver);
                if (mouseOver && tips.isReady()) {
                    tips.refresh();
                    drawToolTips(tips, mouseX, mouseY);
                }
View Full Code Here

    public void initGui() {
        this.buttonList.clear();
        Keyboard.enableRepeatEvents(true);

        List<GuiBetterButton> buttons = new ArrayList<GuiBetterButton>();
        buttons.add(buttonDone = new GuiBetterButton(0, 0, imageHeight + 25, 65, StatCollector.translateToLocal("gui.done")));
        buttons.add(buttonHelp = new GuiBetterButton(1, 0, imageHeight + 25, 65, LocalizationPlugin.translate("railcraft.gui.help")));
        buttons.add(buttonCancel = new GuiBetterButton(2, 0, imageHeight + 25, 65, StatCollector.translateToLocal("gui.cancel")));
        GuiTools.newButtonRowAuto(buttonList, width / 2 - 100, 200, buttons);
        updateButtons();
    }
View Full Code Here

        this.buttonList.clear();
        Keyboard.enableRepeatEvents(true);

        if (editable) {
            List<GuiBetterButton> buttons = new ArrayList<GuiBetterButton>();
            buttons.add(buttonSign = new GuiBetterButton(3, 0, 4 + bookImageHeight, 65, LocalizationPlugin.translate("railcraft.gui.routing.table.name")));
            buttons.add(buttonHelp = new GuiBetterButton(4, 0, 4 + bookImageHeight, 65, LocalizationPlugin.translate("railcraft.gui.help")));
            buttons.add(buttonDone = new GuiBetterButton(0, 0, 4 + bookImageHeight, 65, StatCollector.translateToLocal("gui.done")));
            GuiTools.newButtonRowAuto(buttonList, width / 2 - 100, 200, buttons);
        } else
            buttonList.add(buttonDone = new GuiBetterButton(0, width / 2 - 100, 4 + bookImageHeight, 200, StatCollector.translateToLocal("gui.done")));

        int xOffset = (width - bookImageWidth) / 2;
        byte yOffset = 2;
        buttonList.add(buttonNextPage = new GuiButtonRoutingTableNextPage(1, xOffset + 200, yOffset + 154, true));
        buttonList.add(buttonPreviousPage = new GuiButtonRoutingTableNextPage(2, xOffset + 30, yOffset + 154, false));
View Full Code Here

TOP

Related Classes of mods.railcraft.client.gui.buttons.GuiBetterButton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.