use of riskyken.armourersWorkshop.api.common.skin.type.ISkinPartType in project Armourers-Workshop by RiskyKen.
the class SkinRenderHelper method renderBuildingGrid.
public static void renderBuildingGrid(ISkinType skinType, float scale, boolean showGuides, boolean hidden, boolean multiblock) {
for (int i = 0; i < skinType.getSkinParts().size(); i++) {
ISkinPartType skinPartType = skinType.getSkinParts().get(i);
IPoint3D partOffset = skinPartType.getOffset();
GL11.glTranslated(partOffset.getX() * scale, partOffset.getY() * scale, partOffset.getZ() * scale);
if (skinType == SkinTypeRegistry.skinBlock) {
if (skinPartType.getPartName().equals("multiblock") & multiblock) {
GL11.glColor4f(1F, 1F, 0.0F, 0.2F);
renderBuildingGrid(((SkinBlock) SkinTypeRegistry.skinBlock).partBase, scale, showGuides, hidden);
GL11.glPolygonOffset(6F, 6F);
GL11.glColor4f(0.5F, 0.5F, 0.5F, 0.25F);
renderBuildingGrid(skinPartType, scale, showGuides, hidden);
} else if (skinPartType.getPartName().equals("base") & !multiblock) {
GL11.glColor4f(0.5F, 0.5F, 0.5F, 0.25F);
renderBuildingGrid(skinPartType, scale, showGuides, hidden);
}
} else {
GL11.glColor4f(0.5F, 0.5F, 0.5F, 0.25F);
renderBuildingGrid(skinPartType, scale, showGuides, hidden);
}
GL11.glTranslated(-partOffset.getX() * scale, -partOffset.getY() * scale, -partOffset.getZ() * scale);
}
}
use of riskyken.armourersWorkshop.api.common.skin.type.ISkinPartType in project Armourers-Workshop by RiskyKen.
the class SkinRenderHelper method renderBuildingGuide.
public static void renderBuildingGuide(ISkinType skinType, float scale, boolean showSkinOverlay, boolean showHelper) {
for (int i = 0; i < skinType.getSkinParts().size(); i++) {
ISkinPartType skinPart = skinType.getSkinParts().get(i);
IPoint3D partOffset = skinPart.getOffset();
GL11.glTranslated(partOffset.getX() * scale, partOffset.getY() * scale, partOffset.getZ() * scale);
skinPart.renderBuildingGuide(scale, showSkinOverlay, showHelper);
GL11.glTranslated(-partOffset.getX() * scale, -partOffset.getY() * scale, -partOffset.getZ() * scale);
}
}
use of riskyken.armourersWorkshop.api.common.skin.type.ISkinPartType in project Armourers-Workshop by RiskyKen.
the class GuiDialogClear 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"));
buttonClear = new GuiButtonExt(-1, x + width - 160 - 20, y + height - 30, 80, 20, GuiHelper.getLocalizedControlName(name, "clear"));
dropDownParts = new GuiDropDownList(0, x + 10, y + 20, 60, "", null);
dropDownParts.addListItem("*", "*", true);
if (skinType != null) {
if (skinType != SkinTypeRegistry.skinBlock) {
for (int i = 0; i < skinType.getSkinParts().size(); i++) {
ISkinPartType partType = skinType.getSkinParts().get(i);
addPartToDropDown(dropDownParts, partType);
}
} 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(dropDownParts, partType);
}
}
dropDownParts.setListSelectedIndex(0);
checkClearBlocks = new GuiCheckBox(0, x + 10, y + height - 60, GuiHelper.getLocalizedControlName(name, "clearBlocks"), true);
checkClearPaint = new GuiCheckBox(0, x + 10, y + height - 50, GuiHelper.getLocalizedControlName(name, "clearPaint"), true);
checkClearMarkers = new GuiCheckBox(0, x + 10, y + height - 70, GuiHelper.getLocalizedControlName(name, "clearMarkers"), true);
buttonList.add(buttonClose);
buttonList.add(buttonClear);
buttonList.add(dropDownParts);
buttonList.add(checkClearBlocks);
buttonList.add(checkClearPaint);
buttonList.add(checkClearMarkers);
}
Aggregations