Search in sources :

Example 1 with GuiCheckBox

use of riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox in project Armourers-Workshop by RiskyKen.

the class GuiHologramProjectorTabExtra method initGui.

@Override
public void initGui(int xPos, int yPos, int width, int height) {
    super.initGui(xPos, yPos, width, height);
    checkGlowing = new GuiCheckBox(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 30, GuiHelper.getLocalizedControlName(inventoryName, "glowing"), tileEntity.isGlowing());
    dropDownPowerMode = new GuiDropDownList(0, (int) ((width / 2F) - (200 / 2F)) + 10, 55, 80, "", this);
    for (int i = 0; i < PowerMode.values().length; i++) {
        PowerMode powerMode = PowerMode.values()[i];
        dropDownPowerMode.addListItem(GuiHelper.getLocalizedControlName(inventoryName, "powerMode." + powerMode.toString().toLowerCase()), powerMode.toString(), true);
        if (powerMode == tileEntity.getPowerMode()) {
            dropDownPowerMode.setListSelectedIndex(i);
        }
    }
    buttonList.add(checkGlowing);
    buttonList.add(dropDownPowerMode);
}
Also used : GuiDropDownList(riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList) PowerMode(riskyken.armourersWorkshop.common.tileentities.TileEntityHologramProjector.PowerMode) GuiCheckBox(riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox)

Example 2 with GuiCheckBox

use of riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox in project Armourers-Workshop by RiskyKen.

the class GuiDialogCopy method initGui.

@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonClose = new GuiButtonExt(-1, x + width - 80 - 10, y + height - 30, 80, 20, GuiHelper.getLocalizedControlName(name, "close"));
    buttonCopy = new GuiButtonExt(-1, x + width - 160 - 20, y + height - 30, 80, 20, GuiHelper.getLocalizedControlName(name, "copy"));
    checkMirror = new GuiCheckBox(-1, x + 10, y + height - 50, GuiHelper.getLocalizedControlName(name, "mirror"), false);
    dropDownSrcPart = new GuiDropDownList(0, x + 10, y + 35, 80, "", null);
    dropDownDesPart = new GuiDropDownList(0, x + 100, y + 35, 80, "", null);
    if (skinType != null) {
        if (skinType != SkinTypeRegistry.skinBlock) {
            for (int i = 0; i < skinType.getSkinParts().size(); i++) {
                addPartToDropDown(dropDownSrcPart, skinType.getSkinParts().get(i));
                addPartToDropDown(dropDownDesPart, skinType.getSkinParts().get(i));
            }
        } else {
            boolean multiblock = SkinProperties.PROP_BLOCK_MULTIBLOCK.getValue(skinProperties);
            ISkinPartType partType;
            if (multiblock) {
                partType = ((SkinBlock) SkinTypeRegistry.skinBlock).partMultiblock;
            } else {
                partType = ((SkinBlock) SkinTypeRegistry.skinBlock).partBase;
            }
            addPartToDropDown(dropDownSrcPart, partType);
            addPartToDropDown(dropDownDesPart, partType);
        }
    }
    dropDownSrcPart.setListSelectedIndex(0);
    dropDownDesPart.setListSelectedIndex(0);
    buttonList.add(buttonClose);
    buttonList.add(buttonCopy);
    buttonList.add(checkMirror);
    buttonList.add(dropDownSrcPart);
    buttonList.add(dropDownDesPart);
}
Also used : GuiDropDownList(riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList) ISkinPartType(riskyken.armourersWorkshop.api.common.skin.type.ISkinPartType) GuiButtonExt(cpw.mods.fml.client.config.GuiButtonExt) GuiCheckBox(riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox)

Example 3 with GuiCheckBox

use of riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox in project Armourers-Workshop by RiskyKen.

the class GuiTabArmourerDisplaySettings method initGui.

@Override
public void initGui(int xPos, int yPos, int width, int height) {
    super.initGui(xPos, yPos, width, height);
    String guiName = tileEntity.getInventoryName();
    buttonList.clear();
    checkShowGuides = new GuiCheckBox(7, 10, 95, GuiHelper.getLocalizedControlName(guiName, "showGuide"), tileEntity.isShowGuides());
    checkShowOverlay = new GuiCheckBox(9, 10, 110, GuiHelper.getLocalizedControlName(guiName, "showOverlay"), tileEntity.isShowOverlay());
    checkShowHelper = new GuiCheckBox(6, 10, 110, GuiHelper.getLocalizedControlName(guiName, "showHelper"), tileEntity.isShowHelper());
    buttonList.add(new GuiButtonExt(8, width - 36 - 5, 70, 30, 16, GuiHelper.getLocalizedControlName(guiName, "set")));
    textUserSkin = new GuiTextField(fontRenderer, x + 10, y + 70, 120, 16);
    textUserSkin.setMaxStringLength(300);
    textUserSkin.setText(tileEntity.getTexture().getTextureString());
    textureTypeList = new GuiDropDownList(0, 10, 30, 50, "", this);
    textureTypeList.addListItem(GuiHelper.getLocalizedControlName(tileEntity.getInventoryName(), "dropdown.user"), TextureType.USER.toString(), true);
    textureTypeList.addListItem(GuiHelper.getLocalizedControlName(tileEntity.getInventoryName(), "dropdown.url"), TextureType.URL.toString(), true);
    textureTypeList.setListSelectedIndex(tileEntity.getTexture().getTextureType().ordinal());
    buttonList.add(checkShowGuides);
    buttonList.add(checkShowOverlay);
    buttonList.add(checkShowHelper);
    buttonList.add(textureTypeList);
}
Also used : GuiDropDownList(riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList) GuiButtonExt(cpw.mods.fml.client.config.GuiButtonExt) GuiCheckBox(riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 4 with GuiCheckBox

use of riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox in project Armourers-Workshop by RiskyKen.

the class GuiTabArmourerSkinSettings method initGui.

@Override
public void initGui(int xPos, int yPos, int width, int height) {
    super.initGui(xPos, yPos, width, height);
    String guiName = tileEntity.getInventoryName();
    buttonList.clear();
    SkinProperties skinProps = tileEntity.getSkinProps();
    checkBlockGlowing = new GuiCheckBox(15, 10, 20, GuiHelper.getLocalizedControlName(guiName, "glowing"), SkinProperties.PROP_BLOCK_GLOWING.getValue(skinProps));
    checkBlockLadder = new GuiCheckBox(15, 10, 35, GuiHelper.getLocalizedControlName(guiName, "ladder"), SkinProperties.PROP_BLOCK_LADDER.getValue(skinProps));
    checkBlockNoCollision = new GuiCheckBox(15, 10, 50, GuiHelper.getLocalizedControlName(guiName, "noCollision"), SkinProperties.PROP_BLOCK_NO_COLLISION.getValue(skinProps));
    checkBlockSeat = new GuiCheckBox(15, 10, 65, GuiHelper.getLocalizedControlName(guiName, "seat"), SkinProperties.PROP_BLOCK_SEAT.getValue(skinProps));
    checkBlockMultiblock = new GuiCheckBox(15, 10, 80, GuiHelper.getLocalizedControlName(guiName, "multiblock"), SkinProperties.PROP_BLOCK_MULTIBLOCK.getValue(skinProps));
    checkBlockBed = new GuiCheckBox(15, 22, 95, GuiHelper.getLocalizedControlName(guiName, "bed"), SkinProperties.PROP_BLOCK_BED.getValue(skinProps));
    checkBlockEnderInventory = new GuiCheckBox(15, 10, 110, GuiHelper.getLocalizedControlName(guiName, "enderInventory"), SkinProperties.PROP_BLOCK_ENDER_INVENTORY.getValue(skinProps));
    checkBlockInventory = new GuiCheckBox(15, 10, 125, GuiHelper.getLocalizedControlName(guiName, "inventory"), SkinProperties.PROP_BLOCK_INVENTORY.getValue(skinProps));
    if (!checkBlockMultiblock.isChecked()) {
        checkBlockBed.enabled = false;
        checkBlockBed.setIsChecked(false);
    } else {
        checkBlockBed.enabled = true;
    }
    // TODO remove to re-enable beds
    checkBlockBed.enabled = false;
    checkBlockEnderInventory.enabled = !checkBlockInventory.isChecked();
    checkBlockInventory.enabled = !checkBlockEnderInventory.isChecked();
    if (checkBlockInventory.isChecked()) {
        checkBlockEnderInventory.setIsChecked(false);
    }
    if (checkBlockEnderInventory.isChecked()) {
        checkBlockInventory.setIsChecked(false);
    }
    inventorySize = new GuiInventorySize(10, 158, 9, 6);
    inventorySize.setSrc(TEXTURE, 176, 0);
    inventorySize.setSelection(SkinProperties.PROP_BLOCK_INVENTORY_WIDTH.getValue(skinProps), SkinProperties.PROP_BLOCK_INVENTORY_HEIGHT.getValue(skinProps));
    sliderWingIdleSpeed = new GuiCustomSlider(15, 10, 45, 154, 10, "", "ms", 200D, 10000D, SkinProperties.PROP_WINGS_IDLE_SPEED.getValue(skinProps), false, true, this);
    sliderWingFlyingSpeed = new GuiCustomSlider(15, 10, 65, 154, 10, "", "ms", 200D, 10000D, SkinProperties.PROP_WINGS_FLYING_SPEED.getValue(skinProps), false, true, this);
    sliderWingMinAngle = new GuiCustomSlider(15, 10, 85, 154, 10, "", DEGREE, -180D, 180D, SkinProperties.PROP_WINGS_MIN_ANGLE.getValue(skinProps), false, true, this);
    sliderWingMaxAngle = new GuiCustomSlider(15, 10, 105, 154, 10, "", DEGREE, -180D, 180D, SkinProperties.PROP_WINGS_MAX_ANGLE.getValue(skinProps), false, true, this);
    sliderWingIdleSpeed.setFineTuneButtons(true);
    sliderWingFlyingSpeed.setFineTuneButtons(true);
    sliderWingMinAngle.setFineTuneButtons(true);
    sliderWingMaxAngle.setFineTuneButtons(true);
    checkArmourOverrideBodyPart = new GuiCheckBox(15, 10, 20, GuiHelper.getLocalizedControlName(guiName, "overrideBodyPart"), SkinProperties.PROP_ARMOUR_OVERRIDE.getValue(skinProps));
    checkArmourHideOverlay = new GuiCheckBox(15, 10, 35, GuiHelper.getLocalizedControlName(guiName, "hideOverlay"), SkinProperties.PROP_ARMOUR_HIDE_OVERLAY.getValue(skinProps));
    MovementType skinMovmentType = MovementType.valueOf(SkinProperties.PROP_WINGS_MOVMENT_TYPE.getValue(skinProps));
    dropDownList = new GuiDropDownList(0, 10, 125, 50, "", this);
    for (int i = 0; i < MovementType.values().length; i++) {
        MovementType movementType = MovementType.values()[i];
        String unlocalizedName = "movmentType." + LibModInfo.ID.toLowerCase() + ":" + movementType.name().toLowerCase();
        String localizedName = StatCollector.translateToLocal(unlocalizedName);
        dropDownList.addListItem(localizedName, movementType.name(), true);
        if (movementType == skinMovmentType) {
            dropDownList.setListSelectedIndex(i);
        }
    }
    buttonList.add(checkBlockGlowing);
    buttonList.add(checkBlockLadder);
    buttonList.add(checkBlockNoCollision);
    buttonList.add(checkBlockSeat);
    buttonList.add(checkBlockMultiblock);
    buttonList.add(checkBlockBed);
    buttonList.add(checkBlockInventory);
    buttonList.add(checkBlockEnderInventory);
    buttonList.add(inventorySize);
    buttonList.add(sliderWingIdleSpeed);
    buttonList.add(sliderWingFlyingSpeed);
    buttonList.add(sliderWingMinAngle);
    buttonList.add(sliderWingMaxAngle);
    buttonList.add(checkArmourOverrideBodyPart);
    buttonList.add(checkArmourHideOverlay);
    buttonList.add(dropDownList);
}
Also used : GuiDropDownList(riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList) GuiInventorySize(riskyken.armourersWorkshop.client.gui.controls.GuiInventorySize) GuiCustomSlider(riskyken.armourersWorkshop.client.gui.controls.GuiCustomSlider) GuiCheckBox(riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox) SkinProperties(riskyken.armourersWorkshop.common.skin.data.SkinProperties) MovementType(riskyken.armourersWorkshop.common.skin.type.wings.SkinWings.MovementType)

Example 5 with GuiCheckBox

use of riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox in project Armourers-Workshop by RiskyKen.

the class GuiMannequinTabExtraRenders method initGui.

@Override
public void initGui(int xPos, int yPos, int width, int height) {
    super.initGui(xPos, yPos, width, height);
    isChildCheck = new GuiCheckBox(3, this.width / 2 - 78, 25, GuiHelper.getLocalizedControlName(inventoryName, "label.isChild"), false);
    isExtraRenders = new GuiCheckBox(0, this.width / 2 - 78, 40, GuiHelper.getLocalizedControlName(inventoryName, "label.isExtraRenders"), tileEntity.isRenderExtras());
    isFlying = new GuiCheckBox(0, this.width / 2 - 78, 55, GuiHelper.getLocalizedControlName(inventoryName, "label.isFlying"), tileEntity.isFlying());
    isVisible = new GuiCheckBox(0, this.width / 2 - 78, 70, GuiHelper.getLocalizedControlName(inventoryName, "label.isVisible"), tileEntity.isVisible());
    if (((GuiMannequin) parent).tabRotations.getBipedRotations() != null) {
        isChildCheck.setIsChecked(((GuiMannequin) parent).tabRotations.getBipedRotations().isChild);
    }
    buttonList.add(isChildCheck);
    buttonList.add(isExtraRenders);
    buttonList.add(isFlying);
    buttonList.add(isVisible);
}
Also used : GuiCheckBox(riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox)

Aggregations

GuiCheckBox (riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox)12 GuiDropDownList (riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList)6 GuiButtonExt (cpw.mods.fml.client.config.GuiButtonExt)4 ISkinPartType (riskyken.armourersWorkshop.api.common.skin.type.ISkinPartType)2 GuiCustomSlider (riskyken.armourersWorkshop.client.gui.controls.GuiCustomSlider)2 GuiTextField (net.minecraft.client.gui.GuiTextField)1 ScaledResolution (net.minecraft.client.gui.ScaledResolution)1 Slot (net.minecraft.inventory.Slot)1 ISkinType (riskyken.armourersWorkshop.api.common.skin.type.ISkinType)1 GuiIconButton (riskyken.armourersWorkshop.client.gui.controls.GuiIconButton)1 GuiInventorySize (riskyken.armourersWorkshop.client.gui.controls.GuiInventorySize)1 GuiLabeledTextField (riskyken.armourersWorkshop.client.gui.controls.GuiLabeledTextField)1 GuiList (riskyken.armourersWorkshop.client.gui.controls.GuiList)1 GuiScrollbar (riskyken.armourersWorkshop.client.gui.controls.GuiScrollbar)1 MessageClientSkinWardrobeUpdate (riskyken.armourersWorkshop.common.network.messages.client.MessageClientSkinWardrobeUpdate)1 SkinProperties (riskyken.armourersWorkshop.common.skin.data.SkinProperties)1 MovementType (riskyken.armourersWorkshop.common.skin.type.wings.SkinWings.MovementType)1 PowerMode (riskyken.armourersWorkshop.common.tileentities.TileEntityHologramProjector.PowerMode)1