diff --git a/data/images/imageCSV.csv b/data/images/imageCSV.csv
index 41baa3d8..08dd6ff4 100644
--- a/data/images/imageCSV.csv
+++ b/data/images/imageCSV.csv
@@ -1,36 +1,36 @@
-displayName,imagePath,maskOptions
-White,m15WFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039
-Blue,m15UFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039
-Black,m15BFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039
-Red,m15RFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039
-Green,m15GFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039
-Multicolored,m15MFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039
-Artifact,m15AFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039
-Land,m15LFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039
-Vehicle,m15VFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039
-White PT,m15WPT.png,Full-567-921-140-81
-Blue PT,m15UPT.png,Full-567-921-140-81
-Black PT,m15BPT.png,Full-567-921-140-81
-Red PT,m15RPT.png,Full-567-921-140-81
-Green PT,m15GPT.png,Full-567-921-140-81
-Multicolored PT,m15MPT.png,Full-567-921-140-81
-Artifact PT,m15APT.png,Full-567-921-140-81
-Vehicle PT,m15VPT.png,Full-567-921-140-81
-White Legendary,m15WLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177
-Blue Legendary,m15ULegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177
-Black Legendary,m15BLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177
-Red Legendary,m15RLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177
-Green Legendary,m15GLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177
-Multicolored Legendary,m15MLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177
-Artifact Legendary,m15ALegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177
-Colorless Legendary,m15CLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177
-White Rare Stamp,m15WRareStamp.png,Full-327-943-91-22
-Blue Rare Stamp,m15URareStamp.png,Full-327-943-91-22
-Black Rare Stamp,m15BRareStamp.png,Full-327-943-91-22
-Red Rare Stamp,m15RRareStamp.png,Full-327-943-91-22
-Green Rare Stamp,m15GRareStamp.png,Full-327-943-91-22
-Multicolored Rare Stamp,m15MRareStamp.png,Full-327-943-91-22
-Artifact Rare Stamp,m15ARareStamp.png,Full-327-943-91-22
-Colorless Rare Stamp,m15CRareStamp.png,Full-327-943-91-22
-Holo Stamp,stamp.png,Full-340-953-70-38
-Black Border,masks/Border.png,Full-0-0-744-1039;BoxTopper-0-0-744-1039
\ No newline at end of file
+displayName,imagePath,maskOptions,framePickerOptions
+White,m15WFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039,Regular
+Blue,m15UFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039,Regular
+Black,m15BFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039,Regular
+Red,m15RFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039,Regular
+Green,m15GFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039,Regular
+Multicolored,m15MFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039,Regular
+Artifact,m15AFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039,Regular
+Land,m15LFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039,Regular
+Vehicle,m15VFull.png,Full-0-0-744-1039;Title-0-0-744-1039;Type-0-0-744-1039;Rules Text-0-0-744-1039;Pinline-0-0-744-1039;Frame-0-0-744-1039;BoxTopper-0-0-744-1039,Regular
+White PT,m15WPT.png,Full-567-921-140-81,Regular
+Blue PT,m15UPT.png,Full-567-921-140-81,Regular
+Black PT,m15BPT.png,Full-567-921-140-81,Regular
+Red PT,m15RPT.png,Full-567-921-140-81,Regular
+Green PT,m15GPT.png,Full-567-921-140-81,Regular
+Multicolored PT,m15MPT.png,Full-567-921-140-81,Regular
+Artifact PT,m15APT.png,Full-567-921-140-81,Regular
+Vehicle PT,m15VPT.png,Full-567-921-140-81,Regular
+White Legendary,m15WLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177,Regular
+Blue Legendary,m15ULegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177,Regular
+Black Legendary,m15BLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177,Regular
+Red Legendary,m15RLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177,Regular
+Green Legendary,m15GLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177,Regular
+Multicolored Legendary,m15MLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177,Regular
+Artifact Legendary,m15ALegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177,Regular
+Colorless Legendary,m15CLegendary.png,Full-0-0-744-177;Legend-0-0-744-177;LegendWithBorder-0-0-744-177,Regular
+White Rare Stamp,m15WRareStamp.png,Full-327-943-91-22,Regular
+Blue Rare Stamp,m15URareStamp.png,Full-327-943-91-22,Regular
+Black Rare Stamp,m15BRareStamp.png,Full-327-943-91-22,Regular
+Red Rare Stamp,m15RRareStamp.png,Full-327-943-91-22,Regular
+Green Rare Stamp,m15GRareStamp.png,Full-327-943-91-22,Regular
+Multicolored Rare Stamp,m15MRareStamp.png,Full-327-943-91-22,Regular
+Artifact Rare Stamp,m15ARareStamp.png,Full-327-943-91-22,Regular
+Colorless Rare Stamp,m15CRareStamp.png,Full-327-943-91-22,Regular
+Holo Stamp,stamp.png,Full-340-953-70-38,Regular
+Black Border,masks/Border.png,Full-0-0-744-1039;BoxTopper-0-0-744-1039,Regular
\ No newline at end of file
diff --git a/data/m15 - Shortcut.lnk b/data/m15 - Shortcut.lnk
deleted file mode 100644
index 05c28d0c..00000000
Binary files a/data/m15 - Shortcut.lnk and /dev/null differ
diff --git a/data/scripts/main.js b/data/scripts/main.js
index 94665c22..901b629f 100644
--- a/data/scripts/main.js
+++ b/data/scripts/main.js
@@ -12,6 +12,7 @@ function testFunction() {
/* Initiate! */
window.onload = initiate;
function initiate() {
+ window.CSVList = []
window.version = {}
window.cardWidth = 744;
window.cardHeight = 1039;
@@ -79,33 +80,36 @@ function initiate() {
/* Loads all the image info from the CSV! */
-function loadImageCSV() {
- var xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
- if (this.readyState == 4) {
- var splitImageCSV = xhttp.responseText.split("\n");
- for (var i = 1; i < splitImageCSV.length; i++) {
- var splitIndividualImageCSV = splitImageCSV[i].split(",");
- frameList[frameList.length] = new frameImage(splitIndividualImageCSV[0], "data/images/" + splitIndividualImageCSV[1], splitIndividualImageCSV[2]);
- }
- for (var i = 0; i < frameList.length; i++) {
- document.getElementById("framePicker").appendChild(frameList[i].framePickerElement());
- }
- //I don't like these here, because even though they run, it doesn't populate the mask options
- // document.getElementsByClassName("frameOption")[0].classList.add("frameOptionSelected");
- // selectedMask = document.getElementsByClassName("frameOption")[0].id.replace("frameIndex", "");
- console.log("image csv loaded, happy card conjuring!");
- setTimeout(testFunction, 0); //deleteme
- }
- }
- xhttp.open("GET", "data/images/imageCSV.csv", true);
- xhttp.send();
+function loadImageCSV(targetCSV) {
+ if (!CSVList.includes(targetCSV)) {
+ CSVList[CSVList.length] = targetCSV;
+ var xhttp = new XMLHttpRequest();
+ xhttp.onreadystatechange = function() {
+ if (this.readyState == 4) {
+ var splitImageCSV = xhttp.responseText.split("\n");
+ for (var i = 1; i < splitImageCSV.length; i++) {
+ var splitIndividualImageCSV = splitImageCSV[i].split(",");
+ frameList[frameList.length] = new frameImage(splitIndividualImageCSV[0], "data/images/" + splitIndividualImageCSV[1], splitIndividualImageCSV[2], splitIndividualImageCSV[3].toString());
+ if (i == 1) {
+ frameList[0].image.onload = testFunction;
+ }
+ }
+ for (var i = 0; i < frameList.length; i++) {
+ document.getElementById("framePicker").appendChild(frameList[i].framePickerElement());
+ }
+ console.log("image csv loaded, happy card conjuring!");
+ // setTimeout(testFunction, 0); //deleteme
+ }
+ }
+ xhttp.open("GET", targetCSV, true);
+ xhttp.send();
+ }
}
/* Image Class */
class frameImage {
- constructor(display, path, masks) {
+ constructor(display, path, masks, classes) {
this.displayName = display;
this.image = new Image();
this.image.src = path;
@@ -123,6 +127,10 @@ class frameImage {
this.widthList[i] = scale(parseInt(splitIndividualMasks[3]));
this.heightList[i] = scale(parseInt(splitIndividualMasks[4]));
}
+ this.framePickerClasses =["frameOption"]
+ if (classes[0] == "f") {
+ this.framePickerClasses = ("frameOption;" + classes.slice(0,classes.length - 1)).replace(/;/g, ";frameClass").split(";");
+ }
}
cardMasterElement(targetMask) {
var tempElement = document.createElement("div");
@@ -134,7 +142,9 @@ class frameImage {
framePickerElement(targetElement) {
var tempElement = document.createElement("div");
tempElement.id = "frameIndex" + frameList.indexOf(this);
- tempElement.classList.add("frameOption");
+ for (var i = 0; i < this.framePickerClasses.length; i++) {
+ tempElement.classList.add(this.framePickerClasses[i]);
+ }
tempElement.onclick = frameOptionClicked;
tempElement.innerHTML = ""
return tempElement;
@@ -276,7 +286,7 @@ function cardImageUpdated() {
function changeVersionTo(versionToChangeTo) {
loadScript("data/versions/" + versionToChangeTo + ".js")
}
-function finishChangingVersion() {
+function finishChangingVersion(targetCSV = false) {
for (var i = 0; i < version.textList.length; i ++) {
document.getElementById("inputWhichTextTabs").innerHTML += "