Search in sources :

Example 1 with GuiCustomSlider

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

the class GuiHologramProjectorTabAngle method initGui.

@Override
public void initGui(int xPos, int yPos, int width, int height) {
    super.initGui(xPos, yPos, width, height);
    guiLoaded = false;
    sliderOffsetX = new GuiCustomSlider(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 30, 178, 10, "X: ", DEGREE, -180D, 180D, tileEntity.getAngleX(), false, true, this);
    sliderOffsetY = new GuiCustomSlider(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 45, 178, 10, "Y: ", DEGREE, -180D, 180D, tileEntity.getAngleY(), false, true, this);
    sliderOffsetZ = new GuiCustomSlider(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 60, 178, 10, "Z: ", DEGREE, -180D, 180D, tileEntity.getAngleZ(), false, true, this);
    sliderOffsetX.setFineTuneButtons(true);
    sliderOffsetY.setFineTuneButtons(true);
    sliderOffsetZ.setFineTuneButtons(true);
    buttonList.add(sliderOffsetX);
    buttonList.add(sliderOffsetY);
    buttonList.add(sliderOffsetZ);
    guiLoaded = true;
}
Also used : GuiCustomSlider(riskyken.armourersWorkshop.client.gui.controls.GuiCustomSlider)

Example 2 with GuiCustomSlider

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

the class GuiHologramProjectorTabOffset method initGui.

@Override
public void initGui(int xPos, int yPos, int width, int height) {
    super.initGui(xPos, yPos, width, height);
    guiLoaded = false;
    sliderOffsetX = new GuiCustomSlider(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 30, 178, 10, "X: ", "", -64D, 64D, tileEntity.getOffsetX(), false, true, this);
    sliderOffsetY = new GuiCustomSlider(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 45, 178, 10, "Y: ", "", -64D, 64D, tileEntity.getOffsetY(), false, true, this);
    sliderOffsetZ = new GuiCustomSlider(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 60, 178, 10, "Z: ", "", -64D, 64D, tileEntity.getOffsetZ(), false, true, this);
    sliderOffsetX.setFineTuneButtons(true);
    sliderOffsetY.setFineTuneButtons(true);
    sliderOffsetZ.setFineTuneButtons(true);
    buttonList.add(sliderOffsetX);
    buttonList.add(sliderOffsetY);
    buttonList.add(sliderOffsetZ);
    guiLoaded = true;
}
Also used : GuiCustomSlider(riskyken.armourersWorkshop.client.gui.controls.GuiCustomSlider)

Example 3 with GuiCustomSlider

use of riskyken.armourersWorkshop.client.gui.controls.GuiCustomSlider 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 4 with GuiCustomSlider

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

the class GuiMannequinTabRotations method initGui.

@Override
public void initGui(int xPos, int yPos, int width, int height) {
    super.initGui(xPos, yPos, width, height);
    guiLoaded = false;
    int recX = (int) ((width / 2F) - (ROT_MAN_TEX_WIDTH / 2));
    bipedParts[0] = new Rectangle_I_2D(recX + 183, 18, 8, 8);
    bipedParts[1] = new Rectangle_I_2D(recX + 183, 27, 8, 12);
    bipedParts[2] = new Rectangle_I_2D(recX + 178, 27, 4, 12);
    bipedParts[3] = new Rectangle_I_2D(recX + 192, 27, 4, 12);
    bipedParts[4] = new Rectangle_I_2D(recX + 182, 40, 4, 12);
    bipedParts[5] = new Rectangle_I_2D(recX + 188, 40, 4, 12);
    resetRotsButton = new GuiButtonExt(0, width / 2 + 15, 25, 50, 14, GuiHelper.getLocalizedControlName(inventoryName, "reset"));
    randomRotsButton = new GuiButtonExt(0, width / 2 + 15, 40, 50, 14, GuiHelper.getLocalizedControlName(inventoryName, "random"));
    bipedRotXslider = new GuiCustomSlider(0, (int) ((width / 2F) - (ROT_MAN_TEX_WIDTH / 2F)) + 10, 25, 100, 10, "X: ", "", -180D, 180D, 0D, true, true, this);
    bipedRotYslider = new GuiCustomSlider(0, (int) ((width / 2F) - (ROT_MAN_TEX_WIDTH / 2F)) + 10, 25 + 10, 100, 10, "Y: ", "", -180D, 180D, 0D, true, true, this);
    bipedRotZslider = new GuiCustomSlider(0, (int) ((width / 2F) - (ROT_MAN_TEX_WIDTH / 2F)) + 10, 25 + 20, 100, 10, "Z: ", "", -180D, 180D, 0D, true, true, this);
    if (bipedRotations != null) {
        setSliderValue(bipedRotXslider, Math.toDegrees(-bipedRotations.head.rotationX));
        setSliderValue(bipedRotYslider, Math.toDegrees(-bipedRotations.head.rotationY));
        setSliderValue(bipedRotZslider, Math.toDegrees(-bipedRotations.head.rotationZ));
    }
    buttonList.add(resetRotsButton);
    buttonList.add(randomRotsButton);
    buttonList.add(bipedRotXslider);
    buttonList.add(bipedRotYslider);
    buttonList.add(bipedRotZslider);
    bipedPartChange(0);
    guiLoaded = true;
}
Also used : Rectangle_I_2D(riskyken.armourersWorkshop.common.data.Rectangle_I_2D) GuiCustomSlider(riskyken.armourersWorkshop.client.gui.controls.GuiCustomSlider) GuiButtonExt(cpw.mods.fml.client.config.GuiButtonExt)

Example 5 with GuiCustomSlider

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

the class GuiHologramProjectorTabRotationOffset method initGui.

@Override
public void initGui(int xPos, int yPos, int width, int height) {
    super.initGui(xPos, yPos, width, height);
    guiLoaded = false;
    sliderOffsetX = new GuiCustomSlider(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 30, 178, 10, "X: ", "", -64D, 64D, tileEntity.getRotationOffsetX(), false, true, this);
    sliderOffsetY = new GuiCustomSlider(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 45, 178, 10, "Y: ", "", -64D, 64D, tileEntity.getRotationOffsetY(), false, true, this);
    sliderOffsetZ = new GuiCustomSlider(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 60, 178, 10, "Z: ", "", -64D, 64D, tileEntity.getRotationOffsetZ(), false, true, this);
    checkShowRotationPoint = new GuiCheckBox(-1, (int) ((width / 2F) - (200 / 2F)) + 10, 75, GuiHelper.getLocalizedControlName(inventoryName, "showRotationPoint"), tileEntity.isShowRotationPoint());
    sliderOffsetX.setFineTuneButtons(true);
    sliderOffsetY.setFineTuneButtons(true);
    sliderOffsetZ.setFineTuneButtons(true);
    buttonList.add(sliderOffsetX);
    buttonList.add(sliderOffsetY);
    buttonList.add(sliderOffsetZ);
    buttonList.add(checkShowRotationPoint);
    guiLoaded = true;
}
Also used : GuiCustomSlider(riskyken.armourersWorkshop.client.gui.controls.GuiCustomSlider) GuiCheckBox(riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox)

Aggregations

GuiCustomSlider (riskyken.armourersWorkshop.client.gui.controls.GuiCustomSlider)7 GuiButtonExt (cpw.mods.fml.client.config.GuiButtonExt)2 GuiCheckBox (riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox)2 GuiDropDownList (riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList)1 GuiInventorySize (riskyken.armourersWorkshop.client.gui.controls.GuiInventorySize)1 Rectangle_I_2D (riskyken.armourersWorkshop.common.data.Rectangle_I_2D)1 SkinProperties (riskyken.armourersWorkshop.common.skin.data.SkinProperties)1 MovementType (riskyken.armourersWorkshop.common.skin.type.wings.SkinWings.MovementType)1