Search in sources :

Example 1 with GuiKeybindCheckBox

use of pneumaticCraft.client.gui.widget.GuiKeybindCheckBox in project PneumaticCraft by MineMaarten.

the class GuiHelmetMainScreen method initGui.

@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    upgradePages.clear();
    upgradePageNames.clear();
    addPages();
    for (int i = 0; i < upgradePages.size(); i++) {
        GuiButton button = new GuiButton(100 + i, 210, 20 + i * 22, 200, 20, upgradePages.get(i).getPageName());
        if (page == i)
            button.enabled = false;
        buttonList.add(button);
    }
    if (page > upgradePages.size() - 1)
        page = upgradePages.size() - 1;
    GuiKeybindCheckBox checkBox = new GuiKeybindCheckBox(100, 40, 12, 0xFFFFFFFF, I18n.format("gui.enableModule", I18n.format("pneumaticHelmet.upgrade." + upgradePageNames.get(page))), "pneumaticHelmet.upgrade." + upgradePageNames.get(page));
    if (upgradePages.get(page).canBeTurnedOff())
        addWidget(checkBox);
    upgradePages.get(page).initGui(this);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiKeybindCheckBox(pneumaticCraft.client.gui.widget.GuiKeybindCheckBox)

Aggregations

GuiButton (net.minecraft.client.gui.GuiButton)1 GuiKeybindCheckBox (pneumaticCraft.client.gui.widget.GuiKeybindCheckBox)1