Search in sources :

Example 26 with GuiButtonExt

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

the class GuiModerateHouse method Initialize.

@Override
protected void Initialize() {
    this.serverConfiguration = ((ClientProxy) Prefab.proxy).getServerConfiguration();
    this.configuration = ClientEventHandler.playerConfig.getClientConfig("Moderate Houses", ModerateHouseConfiguration.class);
    this.configuration.pos = this.pos;
    int color = Color.DARK_GRAY.getRGB();
    // Get the upper left hand corner of the GUI box.
    int grayBoxX = this.getCenteredXAxis() - 212;
    int grayBoxY = this.getCenteredYAxis() - 83;
    this.btnHouseStyle = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 20, 90, 20, this.configuration.houseStyle.getDisplayName());
    this.buttonList.add(this.btnHouseStyle);
    // Create the buttons.
    this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 60, 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);
    int x = grayBoxX + 130;
    int y = grayBoxY + 10;
    this.btnAddChest = new GuiCheckBox(6, x, y, GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_ADD_CHEST), this.configuration.addChests);
    this.btnAddChest.setStringColor(color);
    this.btnAddChest.setWithShadow(false);
    this.buttonList.add(this.btnAddChest);
    y += 15;
    this.btnAddMineShaft = new GuiCheckBox(7, x, y, GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_BUILD_MINESHAFT), this.configuration.addChestContents);
    this.btnAddMineShaft.setStringColor(color);
    this.btnAddMineShaft.setWithShadow(false);
    this.buttonList.add(this.btnAddMineShaft);
    y += 15;
    this.btnAddChestContents = new GuiCheckBox(8, x, y, GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_ADD_CHEST_CONTENTS), this.configuration.addMineshaft);
    this.btnAddChestContents.setStringColor(color);
    this.btnAddChestContents.setWithShadow(false);
    this.buttonList.add(this.btnAddChestContents);
}
Also used : ModerateHouseConfiguration(com.wuest.prefab.Config.Structures.ModerateHouseConfiguration) GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt) GuiCheckBox(com.wuest.prefab.Gui.Controls.GuiCheckBox)

Example 27 with GuiButtonExt

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

the class GuiProduceFarm method Initialize.

@Override
public void Initialize() {
    this.configuration = ClientEventHandler.playerConfig.getClientConfig("Produce Farm", ProduceFarmConfiguration.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 : ProduceFarmConfiguration(com.wuest.prefab.Config.Structures.ProduceFarmConfiguration) GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt)

Example 28 with GuiButtonExt

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

the class GuiFishPond method Initialize.

@Override
protected void Initialize() {
    this.configuration = ClientEventHandler.playerConfig.getClientConfig("Fish Pond", FishPondConfiguration.class);
    this.configuration.pos = this.pos;
    // Get the upper left hand corner of the GUI box.
    int grayBoxX = (this.width / 2) - 188;
    int grayBoxY = (this.height / 2) - 83;
    // Create the buttons.
    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 : GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt) FishPondConfiguration(com.wuest.prefab.Config.Structures.FishPondConfiguration)

Example 29 with GuiButtonExt

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

the class GuiTreeFarm method Initialize.

@Override
protected void Initialize() {
    this.configuration = ClientEventHandler.playerConfig.getClientConfig("Tree Farm", TreeFarmConfiguration.class);
    this.configuration.pos = this.pos;
    this.configuration.houseFacing = EnumFacing.NORTH;
    // 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 + 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 : TreeFarmConfiguration(com.wuest.prefab.Config.Structures.TreeFarmConfiguration) GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt)

Example 30 with GuiButtonExt

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

the class GuiVillaerHouses method Initialize.

@Override
public void Initialize() {
    this.configuration = ClientEventHandler.playerConfig.getClientConfig("Villager Houses", VillagerHouseConfiguration.class);
    this.configuration.pos = this.pos;
    this.configuration.houseFacing = EnumFacing.NORTH;
    this.houseStyle = this.configuration.houseStyle;
    // Get the upper left hand corner of the GUI box.
    int grayBoxX = this.getCenteredXAxis() - 205;
    int grayBoxY = this.getCenteredYAxis() - 83;
    this.btnHouseStyle = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 20, 90, 20, this.houseStyle.getDisplayName());
    this.buttonList.add(this.btnHouseStyle);
    // Create the buttons.
    this.btnVisualize = new GuiButtonExt(4, grayBoxX + 10, grayBoxY + 60, 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) VillagerHouseConfiguration(com.wuest.prefab.Config.Structures.VillagerHouseConfiguration)

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