Search in sources :

Example 1 with GuiButtonExt

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

the class GuiGlobalLibraryPanelSearchResults method initGui.

@Override
public void initGui() {
    super.initGui();
    String guiName = ((GuiGlobalLibrary) parent).getGuiName();
    buttonList.clear();
    skinPanelResults.init(x + 5, y + 24, width - 10, height - 52);
    skinPanelResults.setIconSize(iconScale);
    skinPanelResults.setPanelPadding(0);
    skinPanelResults.setShowName(true);
    iconButtonSmall = new GuiIconButton(parent, 0, x + width - 21 * 3, y + 5, 16, 16, GuiHelper.getLocalizedControlName(guiName, "searchResults.small"), BUTTON_TEXTURES);
    iconButtonSmall.setIconLocation(51, 0, 16, 16);
    iconButtonMedium = new GuiIconButton(parent, 0, x + width - 21 * 2, y + 5, 16, 16, GuiHelper.getLocalizedControlName(guiName, "searchResults.medium"), BUTTON_TEXTURES);
    iconButtonMedium.setIconLocation(51, 17, 16, 16);
    iconButtonLarge = new GuiIconButton(parent, 0, x + width - 21, y + 5, 16, 16, GuiHelper.getLocalizedControlName(guiName, "searchResults.large"), BUTTON_TEXTURES);
    iconButtonLarge.setIconLocation(51, 34, 16, 16);
    buttonList.add(iconButtonSmall);
    buttonList.add(iconButtonMedium);
    buttonList.add(iconButtonLarge);
    buttonList.add(skinPanelResults);
    buttonList.add(new GuiButtonExt(1, x + 5, y + height - 25, 80, 20, "<<"));
    buttonList.add(new GuiButtonExt(2, x + width - 85, y + height - 25, 80, 20, ">>"));
}
Also used : GuiIconButton(riskyken.armourersWorkshop.client.gui.controls.GuiIconButton) GuiButtonExt(cpw.mods.fml.client.config.GuiButtonExt) GuiGlobalLibrary(riskyken.armourersWorkshop.client.gui.globallibrary.GuiGlobalLibrary)

Example 2 with GuiButtonExt

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

the class GuiGlobalLibraryPanelSkinEdit method initGui.

@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    textName = new GuiLabeledTextField(fontRenderer, x + 5, y + 35, 180, 12);
    textName.setEmptyLabel(GuiHelper.getLocalizedControlName(guiName, "enterName"));
    textName.setMaxStringLength(80);
    textTags = new GuiLabeledTextField(fontRenderer, x + 5, y + 65, 180, 12);
    textTags.setEmptyLabel(GuiHelper.getLocalizedControlName(guiName, "enterTags"));
    textDescription = new GuiLabeledTextField(fontRenderer, x + 5, y + 95, width - 10, 12);
    textDescription.setEmptyLabel(GuiHelper.getLocalizedControlName(guiName, "enterDescription"));
    textDescription.setMaxStringLength(255);
    if (skinJson != null) {
        if (skinJson.has("name")) {
            textName.setText(skinJson.get("name").getAsString());
        }
        if (skinJson.has("description")) {
            textDescription.setText(skinJson.get("description").getAsString());
        }
    }
    buttonUpdate = new GuiButtonExt(0, x + 5, y + height - 25, 100, 20, GuiHelper.getLocalizedControlName(guiName, "buttonUpdate"));
    buttonDelete = new GuiButtonExt(0, x + width - 105, y + height - 25, 100, 20, GuiHelper.getLocalizedControlName(guiName, "buttonDelete"));
    buttonList.add(buttonUpdate);
    buttonList.add(buttonDelete);
}
Also used : GuiLabeledTextField(riskyken.armourersWorkshop.client.gui.controls.GuiLabeledTextField) GuiButtonExt(cpw.mods.fml.client.config.GuiButtonExt)

Example 3 with GuiButtonExt

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

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

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

the class GuiTabArmourerMain 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();
    SkinTypeRegistry str = SkinTypeRegistry.INSTANCE;
    GuiDropDownList dropDownList = new GuiDropDownList(0, 10, 20, 50, "", this);
    ArrayList<ISkinType> skinList = str.getRegisteredSkinTypes();
    int skinCount = 0;
    for (int i = 0; i < skinList.size(); i++) {
        ISkinType skinType = skinList.get(i);
        if (!skinType.isHidden()) {
            String skinLocalizedName = str.getLocalizedSkinTypeName(skinType);
            String skinRegistryName = skinType.getRegistryName();
            dropDownList.addListItem(skinLocalizedName, skinRegistryName, skinType.enabled());
            if (skinType == tileEntity.getSkinType()) {
                dropDownList.setListSelectedIndex(skinCount);
            }
            skinCount++;
        }
    }
    buttonList.add(dropDownList);
    buttonList.add(new GuiButtonExt(13, 86, 16, 50, 12, GuiHelper.getLocalizedControlName(guiName, "save")));
    buttonList.add(new GuiButtonExt(14, 86, 16 + 13, 50, 12, GuiHelper.getLocalizedControlName(guiName, "load")));
    textItemName = new GuiTextField(fontRenderer, x + 64, y + 58, 103, 16);
    textItemName.setMaxStringLength(40);
    textItemName.setText(tileEntity.getSkinProps().getPropertyString(Skin.KEY_CUSTOM_NAME, ""));
}
Also used : GuiDropDownList(riskyken.armourersWorkshop.client.gui.controls.GuiDropDownList) ISkinType(riskyken.armourersWorkshop.api.common.skin.type.ISkinType) GuiButtonExt(cpw.mods.fml.client.config.GuiButtonExt) SkinTypeRegistry(riskyken.armourersWorkshop.common.skin.type.SkinTypeRegistry) GuiTextField(net.minecraft.client.gui.GuiTextField)

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