Search in sources :

Example 6 with GuiButtonExt

use of cpw.mods.fml.client.config.GuiButtonExt 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 7 with GuiButtonExt

use of cpw.mods.fml.client.config.GuiButtonExt in project Armourers-Workshop by RiskyKen.

the class GuiMannequinTabTexture method initGui.

@Override
public void initGui(int xPos, int yPos, int width, int height) {
    super.initGui(xPos, yPos, width, height);
    textureTypeList = new GuiDropDownList(0, width / 2 - 110, 25, 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.getTextureType().ordinal());
    nameTextbox = new GuiTextField(fontRenderer, width / 2 - 110 + 55, 25, 165, 14);
    nameTextbox.setMaxStringLength(300);
    if (tileEntity.getTextureType() == TextureType.USER) {
        if (tileEntity.getGameProfile() != null) {
            nameTextbox.setText(tileEntity.getGameProfile().getName());
        }
    } else {
        if (tileEntity.getImageUrl() != null) {
            nameTextbox.setText(tileEntity.getImageUrl());
        }
    }
    setNameButton = new GuiButtonExt(0, width / 2 + 60, 45, 50, 14, GuiHelper.getLocalizedControlName(tileEntity.getInventoryName(), "set"));
    setNameButton.width = fontRenderer.getStringWidth(setNameButton.displayString + "  ");
    setNameButton.xPosition = width / 2 + TAB_WIDTH / 2 - setNameButton.width - 10;
    buttonList.add(textureTypeList);
    buttonList.add(setNameButton);
}
Also used : GuiDropDownList(riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList) GuiButtonExt(cpw.mods.fml.client.config.GuiButtonExt) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 8 with GuiButtonExt

use of cpw.mods.fml.client.config.GuiButtonExt in project Armourers-Workshop by RiskyKen.

the class GuiMiniArmourer method initGui.

@Override
public void initGui() {
    super.initGui();
    String guiName = tileEntity.getInventoryName();
    buttonList.clear();
    buttonList.add(new GuiButtonExt(0, guiLeft + 58, guiTop + 53, 50, 12, GuiHelper.getLocalizedControlName(guiName, "save")));
    buttonList.add(new GuiButtonExt(1, guiLeft + 58, guiTop + 53 + 13, 50, 12, GuiHelper.getLocalizedControlName(guiName, "load")));
}
Also used : GuiButtonExt(cpw.mods.fml.client.config.GuiButtonExt)

Example 9 with GuiButtonExt

use of cpw.mods.fml.client.config.GuiButtonExt in project Armourers-Workshop by RiskyKen.

the class GuiMiniArmourerBuilding method initGui.

@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new GuiButtonExt(0, this.width - 60, this.height - 18, 60, 18, "Exit"));
    buttonList.add(new GuiButtonExt(1, 0, this.height - 18, 60, 18, "Cookies"));
    dropDownParts = new GuiDropDownList(3, 84, 2, 80, "", this);
    dropDownSkins = new GuiDropDownList(2, 2, 2, 80, "", this);
    ArrayList<ISkinType> skinTypes = SkinTypeRegistry.INSTANCE.getRegisteredSkinTypes();
    int skinCount = 0;
    for (int i = 0; i < skinTypes.size(); i++) {
        ISkinType skinType = skinTypes.get(i);
        if (skinType != SkinTypeRegistry.skinSkirt) {
            String skinLocalizedName = SkinTypeRegistry.INSTANCE.getLocalizedSkinTypeName(skinType);
            String skinRegistryName = skinType.getRegistryName();
            dropDownSkins.addListItem(skinLocalizedName, skinRegistryName, skinType.enabled());
            if (skinType == tileEntity.getSkinType()) {
                dropDownSkins.setListSelectedIndex(skinCount);
                updatePartsDropDown(skinType);
            }
            skinCount++;
        }
    }
    buttonList.add(dropDownSkins);
    buttonList.add(dropDownParts);
}
Also used : GuiDropDownList(riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList) ISkinType(riskyken.armourersWorkshop.api.common.skin.type.ISkinType) GuiButtonExt(cpw.mods.fml.client.config.GuiButtonExt)

Example 10 with GuiButtonExt

use of cpw.mods.fml.client.config.GuiButtonExt in project Armourers-Workshop by RiskyKen.

the class GuiDialogDelete 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"));
    buttonDelete = new GuiButtonExt(-1, x + width - 160 - 20, y + height - 30, 80, 20, GuiHelper.getLocalizedControlName(name, "delete"));
    buttonList.add(buttonClose);
    buttonList.add(buttonDelete);
}
Also used : GuiButtonExt(cpw.mods.fml.client.config.GuiButtonExt)

Aggregations

GuiButtonExt (cpw.mods.fml.client.config.GuiButtonExt)26 GuiDropDownList (riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList)7 GuiLabeledTextField (riskyken.armourersWorkshop.client.gui.controls.GuiLabeledTextField)6 GuiCheckBox (riskyken.armourersWorkshop.client.gui.controls.GuiCheckBox)4 GuiTextField (net.minecraft.client.gui.GuiTextField)3 ISkinType (riskyken.armourersWorkshop.api.common.skin.type.ISkinType)3 GuiIconButton (riskyken.armourersWorkshop.client.gui.controls.GuiIconButton)3 GuiGlobalLibrary (riskyken.armourersWorkshop.client.gui.globallibrary.GuiGlobalLibrary)3 ISkinPartType (riskyken.armourersWorkshop.api.common.skin.type.ISkinPartType)2 GuiCustomSlider (riskyken.armourersWorkshop.client.gui.controls.GuiCustomSlider)2 Calendar (java.util.Calendar)1 ScaledResolution (net.minecraft.client.gui.ScaledResolution)1 Slot (net.minecraft.inventory.Slot)1 GuiList (riskyken.armourersWorkshop.client.gui.controls.GuiList)1 GuiScrollbar (riskyken.armourersWorkshop.client.gui.controls.GuiScrollbar)1 Rectangle_I_2D (riskyken.armourersWorkshop.common.data.Rectangle_I_2D)1 SkinTypeRegistry (riskyken.armourersWorkshop.common.skin.type.SkinTypeRegistry)1