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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations