Search in sources :

Example 6 with GuiButtonExt

use of net.minecraftforge.fml.client.config.GuiButtonExt in project MC-Prefab by Brian-Wuest.

the class GuiMonsterMasher method Initialize.

@Override
public void Initialize() {
    this.configuration = ClientEventHandler.playerConfig.getClientConfig("Monster Masher", MonsterMasherConfiguration.class);
    this.configuration.pos = this.pos;
    // Get the upper left hand corner of the GUI box.
    int grayBoxX = this.getCenteredXAxis() - 210;
    int grayBoxY = this.getCenteredYAxis() - 83;
    // Create the buttons.
    this.btnGlassColor = new GuiButtonExt(10, grayBoxX + 10, grayBoxY + 20, 90, 20, GuiLangKeys.translateDye(this.configuration.dyeColor));
    this.buttonList.add(this.btnGlassColor);
    this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 90, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
    this.buttonList.add(this.btnVisualize);
    // Create the done and cancel buttons.
    this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
    this.buttonList.add(this.btnBuild);
    this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
    this.buttonList.add(this.btnCancel);
}
Also used : MonsterMasherConfiguration(com.wuest.prefab.Config.Structures.MonsterMasherConfiguration) GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt)

Example 7 with GuiButtonExt

use of net.minecraftforge.fml.client.config.GuiButtonExt in project MC-Prefab by Brian-Wuest.

the class GuiNetherGate method Initialize.

@Override
protected void Initialize() {
    this.configuration = ClientEventHandler.playerConfig.getClientConfig("Nether Gate", NetherGateConfiguration.class);
    this.configuration.pos = this.pos;
    // Get the upper left hand corner of the GUI box.
    int grayBoxX = this.getCenteredXAxis() - 213;
    int grayBoxY = this.getCenteredYAxis() - 83;
    // Create the buttons.
    this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 20, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW));
    this.buttonList.add(this.btnVisualize);
    // Create the done and cancel buttons.
    this.btnBuild = new GuiButtonExt(1, grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
    this.buttonList.add(this.btnBuild);
    this.btnCancel = new GuiButtonExt(2, grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL));
    this.buttonList.add(this.btnCancel);
}
Also used : GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt) NetherGateConfiguration(com.wuest.prefab.Config.Structures.NetherGateConfiguration)

Example 8 with GuiButtonExt

use of net.minecraftforge.fml.client.config.GuiButtonExt in project MC-Prefab by Brian-Wuest.

the class GuiDrafter method createGeneralTabControls.

private int createGeneralTabControls(int grayBoxX, int grayBoxY, int uiComponentID) {
    int roomX = grayBoxX + 40;
    int roomY = grayBoxY + 30;
    // Create the 49 room buttons.
    for (int i = 1; i < 50; i++) {
        GuiRoomInfoButton roomButton = new GuiRoomInfoButton(uiComponentID++, roomX, roomY, 18, 18, "");
        HoverChecker hoverChecker = new HoverChecker(roomButton, 800);
        this.roomHovers.add(hoverChecker);
        this.buttonList.add(roomButton);
        this.roomButtons.add(roomButton);
        roomX = roomX + 18;
        if (i % 7 == 0) {
            roomX = grayBoxX + 40;
            roomY = roomY + 18;
        }
    }
    this.btnBasement2 = new GuiButtonExt(uiComponentID++, grayBoxX + 10, grayBoxY + 145, 20, 20, "B2");
    this.buttonList.add(this.btnBasement2);
    this.btnBasement1 = new GuiButtonExt(uiComponentID++, grayBoxX + 10, grayBoxY + 120, 20, 20, "B1");
    this.buttonList.add(this.btnBasement1);
    this.btnGroundFloor = new GuiButtonExt(uiComponentID++, grayBoxX + 10, grayBoxY + 95, 20, 20, "G");
    this.btnGroundFloor.enabled = false;
    this.buttonList.add(this.btnGroundFloor);
    this.btnSecondFloor = new GuiButtonExt(uiComponentID++, grayBoxX + 10, grayBoxY + 70, 20, 20, "2");
    this.buttonList.add(this.btnSecondFloor);
    this.btnThirdFloor = new GuiButtonExt(uiComponentID++, grayBoxX + 10, grayBoxY + 45, 20, 20, "3");
    this.buttonList.add(this.btnThirdFloor);
    this.btnClearPending = new GuiButtonExt(uiComponentID++, grayBoxX + 110, grayBoxY + 186, 80, 20, "Clear Pending");
    this.buttonList.add(this.btnClearPending);
    this.btnBuild = new GuiButtonExt(uiComponentID++, grayBoxX + 195, grayBoxY + 186, 50, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD));
    this.buttonList.add(this.btnBuild);
    this.btnCancel = new GuiButtonExt(uiComponentID++, grayBoxX + 250, grayBoxY + 186, 50, 20, "Close");
    this.buttonList.add(this.btnCancel);
    // Tabs:
    this.tabGeneral = new GuiTab(this.Tabs, GuiLangKeys.translateString(GuiLangKeys.STARTER_TAB_GENERAL), grayBoxX + 5, grayBoxY - 10);
    this.Tabs.AddTab(this.tabGeneral);
    this.tabDesignRoom = new GuiTab(this.Tabs, "Design Room", grayBoxX + 58, grayBoxY - 10);
    this.tabDesignRoom.width = 90;
    this.tabDesignRoom.visible = false;
    this.Tabs.AddTab(tabDesignRoom);
    this.tabPendingChanges = new GuiTab(this.Tabs, "Pending Changes", grayBoxX + 151, grayBoxY - 10);
    this.tabPendingChanges.width = 100;
    this.tabPendingChanges.visible = false;
    this.Tabs.AddTab(this.tabPendingChanges);
    try {
        this.actionPerformed(this.btnGroundFloor);
        this.roomButtons.get(45).roomInfo.StructureName = AvailableRoomType.Foyer;
        this.actionPerformed(this.btnGroundFloor);
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return uiComponentID;
}
Also used : GuiTab(com.wuest.prefab.Gui.Controls.GuiTab) GuiRoomInfoButton(com.wuest.prefab.Gui.Controls.GuiRoomInfoButton) GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt) IOException(java.io.IOException) HoverChecker(net.minecraftforge.fml.client.config.HoverChecker)

Example 9 with GuiButtonExt

use of net.minecraftforge.fml.client.config.GuiButtonExt in project MC-Prefab by Brian-Wuest.

the class GuiDrafter method createDesignRoomTabControls.

private int createDesignRoomTabControls(int grayBoxX, int grayBoxY, int uiComponentID) {
    this.btnAddToPending = new GuiButtonExt(uiComponentID++, grayBoxX + 115, grayBoxY + 186, 130, 20, "Add To Pending Changes");
    this.buttonList.add(this.btnAddToPending);
    this.listRooms = new RoomList(this, this.mc, 100, 85, grayBoxY + 25, grayBoxX + 10, 20);
    this.roomMaterials = new RoomMaterials(this, this.mc, 175, 85, grayBoxY + 25, grayBoxX + 125, 20);
    return uiComponentID;
}
Also used : GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt)

Example 10 with GuiButtonExt

use of net.minecraftforge.fml.client.config.GuiButtonExt in project Minestuck by mraof.

the class GuiSburbMachine method initGui.

@Override
public void initGui() {
    super.initGui();
    if (!te.isAutomatic()) {
        goButton = new GuiButtonExt(1, (width - xSize) / 2 + goX, (height - ySize) / 2 + goY, 30, 12, te.overrideStop ? "STOP" : "GO");
        buttonList.add(goButton);
    }
}
Also used : GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt)

Aggregations

GuiButtonExt (net.minecraftforge.fml.client.config.GuiButtonExt)46 HoverChecker (net.minecraftforge.fml.client.config.HoverChecker)11 GuiCheckBox (net.minecraftforge.fml.client.config.GuiCheckBox)10 GuiTextField (net.minecraft.client.gui.GuiTextField)9 GuiButton (net.minecraft.client.gui.GuiButton)4 GuiTooltip (org.blockartistry.lib.gui.GuiTooltip)4 GuiCheckBox (com.wuest.prefab.Gui.Controls.GuiCheckBox)3 GuiTab (com.wuest.prefab.Gui.Controls.GuiTab)2 GuiLabel (net.minecraft.client.gui.GuiLabel)2 GuiSlider (net.minecraftforge.fml.client.config.GuiSlider)2 IStructureConfigurationCapability (com.wuest.prefab.Capabilities.IStructureConfigurationCapability)1 BasicStructureConfiguration (com.wuest.prefab.Config.Structures.BasicStructureConfiguration)1 BulldozerConfiguration (com.wuest.prefab.Config.Structures.BulldozerConfiguration)1 ChickenCoopConfiguration (com.wuest.prefab.Config.Structures.ChickenCoopConfiguration)1 FishPondConfiguration (com.wuest.prefab.Config.Structures.FishPondConfiguration)1 HorseStableConfiguration (com.wuest.prefab.Config.Structures.HorseStableConfiguration)1 InstantBridgeConfiguration (com.wuest.prefab.Config.Structures.InstantBridgeConfiguration)1 ModerateHouseConfiguration (com.wuest.prefab.Config.Structures.ModerateHouseConfiguration)1 ModularHouseConfiguration (com.wuest.prefab.Config.Structures.ModularHouseConfiguration)1 MonsterMasherConfiguration (com.wuest.prefab.Config.Structures.MonsterMasherConfiguration)1