Search in sources :

Example 16 with GuiButtonExt

use of net.minecraftforge.fml.client.config.GuiButtonExt in project Cavern2 by kegare.

the class GuiMiningRecords method initGui.

@Override
public void initGui() {
    if (recordList == null) {
        recordList = new RecordList();
    }
    recordList.setDimensions(width, height, 32, height - 28);
    if (doneButton == null) {
        doneButton = new GuiButtonExt(0, 0, 0, 145, 20, I18n.format("gui.done"));
    }
    doneButton.x = width / 2 + 10;
    doneButton.y = height - doneButton.height - 4;
    if (detailInfo == null) {
        detailInfo = new GuiCheckBox(1, 0, 12, I18n.format(Config.LANG_KEY + "detail"), true);
    }
    detailInfo.setIsChecked(CaveConfigGui.detailInfo);
    detailInfo.x = width / 2 + 95;
    buttonList.clear();
    buttonList.add(doneButton);
    buttonList.add(detailInfo);
    detailHoverChecker = new HoverChecker(detailInfo, 800);
    selectedHoverChecker = new HoverChecker(0, 20, 0, 100, 800);
}
Also used : GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt) GuiCheckBox(net.minecraftforge.fml.client.config.GuiCheckBox) HoverChecker(net.minecraftforge.fml.client.config.HoverChecker)

Example 17 with GuiButtonExt

use of net.minecraftforge.fml.client.config.GuiButtonExt in project Cavern2 by kegare.

the class GuiSelectBiome method initGui.

@Override
public void initGui() {
    if (biomeList == null) {
        biomeList = new BiomeList();
    }
    biomeList.setDimensions(width, height, 32, height - 28);
    if (doneButton == null) {
        doneButton = new GuiButtonExt(0, 0, 0, 145, 20, I18n.format("gui.done"));
    }
    doneButton.x = width / 2 + 10;
    doneButton.y = height - doneButton.height - 4;
    if (detailInfo == null) {
        detailInfo = new GuiCheckBox(1, 0, 5, I18n.format(Config.LANG_KEY + "detail"), true);
    }
    detailInfo.setIsChecked(CaveConfigGui.detailInfo);
    detailInfo.x = width / 2 + 95;
    if (instantFilter == null) {
        instantFilter = new GuiCheckBox(2, 0, detailInfo.y + detailInfo.height + 2, I18n.format(Config.LANG_KEY + "instant"), true);
    }
    instantFilter.setIsChecked(CaveConfigGui.instantFilter);
    instantFilter.x = detailInfo.x;
    buttonList.clear();
    buttonList.add(doneButton);
    buttonList.add(detailInfo);
    buttonList.add(instantFilter);
    if (filterTextField == null) {
        filterTextField = new GuiTextField(0, fontRenderer, 0, 0, 150, 16);
        filterTextField.setMaxStringLength(100);
    }
    filterTextField.x = width / 2 - filterTextField.width - 5;
    filterTextField.y = height - filterTextField.height - 6;
    selectedHoverChecker = new HoverChecker(0, 20, 0, 100, 800);
    detailHoverChecker = new HoverChecker(detailInfo, 800);
    instantHoverChecker = new HoverChecker(instantFilter, 800);
}
Also used : GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt) GuiCheckBox(net.minecraftforge.fml.client.config.GuiCheckBox) GuiTextField(net.minecraft.client.gui.GuiTextField) HoverChecker(net.minecraftforge.fml.client.config.HoverChecker)

Example 18 with GuiButtonExt

use of net.minecraftforge.fml.client.config.GuiButtonExt in project Cavern2 by kegare.

the class GuiSelectBlock method initGui.

@Override
public void initGui() {
    if (blockList == null) {
        blockList = new BlockList();
    }
    blockList.setDimensions(width, height, 32, height - 28);
    boolean hasSwitch = switchEntry != null;
    int buttonWidth = hasSwitch ? 70 : 145;
    if (doneButton == null) {
        doneButton = new GuiButtonExt(0, 0, 0, buttonWidth, 20, I18n.format("gui.done"));
    }
    doneButton.x = width / 2 + 10;
    doneButton.y = height - doneButton.height - 4;
    if (switchButton == null) {
        switchButton = new GuiButtonExt(3, 0, 0, buttonWidth, 20, hasSwitch ? switchEntry.getTranslatedName() : "");
        switchButton.visible = hasSwitch;
    }
    switchButton.x = doneButton.x;
    switchButton.y = doneButton.y;
    if (hasSwitch) {
        doneButton.x += buttonWidth + 3;
    }
    if (detailInfo == null) {
        detailInfo = new GuiCheckBox(1, 0, 5, I18n.format(Config.LANG_KEY + "detail"), true);
    }
    detailInfo.setIsChecked(CaveConfigGui.detailInfo);
    detailInfo.x = width / 2 + 95;
    if (instantFilter == null) {
        instantFilter = new GuiCheckBox(2, 0, detailInfo.y + detailInfo.height + 2, I18n.format(Config.LANG_KEY + "instant"), true);
    }
    instantFilter.setIsChecked(CaveConfigGui.instantFilter);
    instantFilter.x = detailInfo.x;
    buttonList.clear();
    buttonList.add(doneButton);
    buttonList.add(switchButton);
    buttonList.add(detailInfo);
    buttonList.add(instantFilter);
    if (filterTextField == null) {
        filterTextField = new GuiTextField(0, fontRenderer, 0, 0, 150, 16);
        filterTextField.setMaxStringLength(100);
    }
    filterTextField.x = width / 2 - filterTextField.width - 5;
    filterTextField.y = height - filterTextField.height - 6;
    selectedHoverChecker = new HoverChecker(0, 20, 0, 100, 800);
    detailHoverChecker = new HoverChecker(detailInfo, 800);
    instantHoverChecker = new HoverChecker(instantFilter, 800);
    if (switchEntry != null && mc.currentScreen == this) {
        switchEntry.getGuiScreen().setWorldAndResolution(mc, width, height);
    }
}
Also used : GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt) GuiCheckBox(net.minecraftforge.fml.client.config.GuiCheckBox) GuiTextField(net.minecraft.client.gui.GuiTextField) HoverChecker(net.minecraftforge.fml.client.config.HoverChecker)

Example 19 with GuiButtonExt

use of net.minecraftforge.fml.client.config.GuiButtonExt in project Cavern2 by kegare.

the class GuiSelectMob method initGui.

@Override
public void initGui() {
    if (mobList == null) {
        mobList = new MobList();
    }
    mobList.setDimensions(width, height, 32, height - 28);
    if (doneButton == null) {
        doneButton = new GuiButtonExt(0, 0, 0, 145, 20, I18n.format("gui.done"));
    }
    doneButton.x = width / 2 + 10;
    doneButton.y = height - doneButton.height - 4;
    if (detailInfo == null) {
        detailInfo = new GuiCheckBox(1, 0, 5, I18n.format(Config.LANG_KEY + "detail"), true);
    }
    detailInfo.setIsChecked(CaveConfigGui.detailInfo);
    detailInfo.x = width / 2 + 95;
    if (instantFilter == null) {
        instantFilter = new GuiCheckBox(2, 0, detailInfo.y + detailInfo.height + 2, I18n.format(Config.LANG_KEY + "instant"), true);
    }
    instantFilter.setIsChecked(CaveConfigGui.instantFilter);
    instantFilter.x = detailInfo.x;
    buttonList.clear();
    buttonList.add(doneButton);
    buttonList.add(detailInfo);
    buttonList.add(instantFilter);
    if (filterTextField == null) {
        filterTextField = new GuiTextField(0, fontRenderer, 0, 0, 150, 16);
        filterTextField.setMaxStringLength(100);
    }
    filterTextField.x = width / 2 - filterTextField.width - 5;
    filterTextField.y = height - filterTextField.height - 6;
    detailHoverChecker = new HoverChecker(detailInfo, 800);
    instantHoverChecker = new HoverChecker(instantFilter, 800);
    selectedHoverChecker = new HoverChecker(0, 20, 0, 100, 800);
}
Also used : GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt) GuiCheckBox(net.minecraftforge.fml.client.config.GuiCheckBox) GuiTextField(net.minecraft.client.gui.GuiTextField) HoverChecker(net.minecraftforge.fml.client.config.HoverChecker)

Example 20 with GuiButtonExt

use of net.minecraftforge.fml.client.config.GuiButtonExt in project Cavern2 by kegare.

the class GuiSelectOreDict method initGui.

@Override
public void initGui() {
    if (oreDictList == null) {
        oreDictList = new OreDictList();
    }
    oreDictList.setDimensions(width, height, 32, height - 28);
    boolean hasSwitch = switchEntry != null;
    int buttonWidth = hasSwitch ? 70 : 145;
    if (doneButton == null) {
        doneButton = new GuiButtonExt(0, 0, 0, buttonWidth, 20, I18n.format("gui.done"));
    }
    doneButton.x = width / 2 + 10;
    doneButton.y = height - doneButton.height - 4;
    if (switchButton == null) {
        switchButton = new GuiButtonExt(3, 0, 0, buttonWidth, 20, hasSwitch ? switchEntry.getTranslatedName() : "");
        switchButton.visible = hasSwitch;
    }
    switchButton.x = doneButton.x;
    switchButton.y = doneButton.y;
    if (hasSwitch) {
        doneButton.x += buttonWidth + 3;
    }
    if (detailInfo == null) {
        detailInfo = new GuiCheckBox(1, 0, 5, I18n.format(Config.LANG_KEY + "detail"), true);
    }
    detailInfo.setIsChecked(CaveConfigGui.detailInfo);
    detailInfo.x = width / 2 + 95;
    if (instantFilter == null) {
        instantFilter = new GuiCheckBox(2, 0, detailInfo.y + detailInfo.height + 2, I18n.format(Config.LANG_KEY + "instant"), true);
    }
    instantFilter.setIsChecked(CaveConfigGui.instantFilter);
    instantFilter.x = detailInfo.x;
    buttonList.clear();
    buttonList.add(doneButton);
    buttonList.add(switchButton);
    buttonList.add(detailInfo);
    buttonList.add(instantFilter);
    if (filterTextField == null) {
        filterTextField = new GuiTextField(0, fontRenderer, 0, 0, 150, 16);
        filterTextField.setMaxStringLength(100);
    }
    filterTextField.x = width / 2 - filterTextField.width - 5;
    filterTextField.y = height - filterTextField.height - 6;
    selectedHoverChecker = new HoverChecker(0, 20, 0, 100, 800);
    detailHoverChecker = new HoverChecker(detailInfo, 800);
    instantHoverChecker = new HoverChecker(instantFilter, 800);
    if (switchEntry != null && mc.currentScreen == this) {
        switchEntry.getGuiScreen().setWorldAndResolution(mc, width, height);
    }
}
Also used : GuiButtonExt(net.minecraftforge.fml.client.config.GuiButtonExt) GuiCheckBox(net.minecraftforge.fml.client.config.GuiCheckBox) GuiTextField(net.minecraft.client.gui.GuiTextField) HoverChecker(net.minecraftforge.fml.client.config.HoverChecker)

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