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, ">>"));
}
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);
}
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);
}
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);
}
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, ""));
}
Aggregations