diff --git a/data/borders/miniPlane/border.js b/data/borders/miniPlane/border.js index c88a72cd..cc8cf53e 100644 --- a/data/borders/miniPlane/border.js +++ b/data/borders/miniPlane/border.js @@ -16,7 +16,7 @@ cardData.titleAlignment = "center" cardData.titleX = cardWidth / 2 cardData.titleY = cheight(95) cardData.titleFontSize = cwidth(42) -cardData.titleRight = cwidth(1000) +// cardData.titleRight = cwidth(1000) cardData.typeAlignment = "center" cardData.typeX = cardWidth / 2 cardData.typeY = cheight(735) diff --git a/data/borders/tokenTall/border.js b/data/borders/tokenTall/border.js index 2c33977d..30c3ba51 100644 --- a/data/borders/tokenTall/border.js +++ b/data/borders/tokenTall/border.js @@ -6,13 +6,22 @@ cardData.miracle = false cardData.nyx = false cardData.rareStamp = false //Specific Values - +cardData.cardArtX = cwidth(56) +cardData.cardArtY = cheight(124) +cardData.manaSymbolDirection = "none" +document.getElementById("inputTitleColor").value = "#ffe886" +cardData.titleX = cardWidth / 2 +cardData.titleAlignment = "center" +cardData.titleFont = "belerenbsc" //Images -// imgArtMask.load("data/borders/fullArtLandM15/imgArtMask.png") -// imgFrameMask.load("data/borders/fullArtLandM15/imgFrameMask.png") -// imgPinlineMask.load("data/borders/fullArtLandM15/imgPinlineMask.png") -// imgTitleMask.load("data/borders/fullArtLandM15/imgTitleMask.png") -// imgTypeMask.load("data/borders/fullArtLandM15/imgTypeMask.png") +imgArtMask.load("data/borders/tokenTall/imgArtMask.png") +imgFrameMask.load("data/borders/tokenTall/imgFrameMask.png") +imgPinlineMask.load("data/borders/tokenTall/imgPinlineMask.png") +imgTitleMask.load("data/borders/tokenTall/imgTitleMask.png") +imgTypeMask.load("data/borders/tokenTall/imgTypeMask.png") +imgRulesMask.load("data/borders/tokenTall/imgRulesMask.png") +imgLegendary.load("none", cwidth(26), cheight(20), cwidth(697), cheight(112)) +imgLegendaryRight.load("none", cwidth(26), cheight(20), cwidth(697), cheight(112)) //Loads the Colors loadColors("white-White,blue-Blue,black-Black,red-Red,green-Green,gold-Gold,artifact-Artifact,colorless-Colorless") //Runs the things! diff --git a/data/borders/tokenTall/borderMask.png b/data/borders/tokenTall/borderMask.png deleted file mode 100644 index 68760f52..00000000 Binary files a/data/borders/tokenTall/borderMask.png and /dev/null differ diff --git a/data/borders/tokenTall/imgArtMask.png b/data/borders/tokenTall/imgArtMask.png new file mode 100644 index 00000000..533978dc Binary files /dev/null and b/data/borders/tokenTall/imgArtMask.png differ diff --git a/data/borders/tokenTall/multiMask.png b/data/borders/tokenTall/imgFrameMask.png similarity index 53% rename from data/borders/tokenTall/multiMask.png rename to data/borders/tokenTall/imgFrameMask.png index 59af247a..d772a785 100644 Binary files a/data/borders/tokenTall/multiMask.png and b/data/borders/tokenTall/imgFrameMask.png differ diff --git a/data/borders/tokenTall/artMask.png b/data/borders/tokenTall/imgPinlineMask.png similarity index 51% rename from data/borders/tokenTall/artMask.png rename to data/borders/tokenTall/imgPinlineMask.png index f4ddfce5..30f248ca 100644 Binary files a/data/borders/tokenTall/artMask.png and b/data/borders/tokenTall/imgPinlineMask.png differ diff --git a/data/borders/tokenTall/imgRulesMask.png b/data/borders/tokenTall/imgRulesMask.png new file mode 100644 index 00000000..5b5a220e Binary files /dev/null and b/data/borders/tokenTall/imgRulesMask.png differ diff --git a/data/borders/tokenTall/imgTitleMask.png b/data/borders/tokenTall/imgTitleMask.png new file mode 100644 index 00000000..00f73395 Binary files /dev/null and b/data/borders/tokenTall/imgTitleMask.png differ diff --git a/data/borders/tokenTall/imgTypeMask.png b/data/borders/tokenTall/imgTypeMask.png new file mode 100644 index 00000000..7de44416 Binary files /dev/null and b/data/borders/tokenTall/imgTypeMask.png differ diff --git a/data/borders/tokenTall/legendFrameMask.png b/data/borders/tokenTall/legendFrameMask.png deleted file mode 100644 index 7198b5d9..00000000 Binary files a/data/borders/tokenTall/legendFrameMask.png and /dev/null differ diff --git a/data/borders/tokenTall/old.js b/data/borders/tokenTall/old.js deleted file mode 100644 index 138fb08a..00000000 --- a/data/borders/tokenTall/old.js +++ /dev/null @@ -1,57 +0,0 @@ -//M15 Border -//Anything to do with... -//Loading Images -var artX = 56 -var artY = 125 -imgMultiMask.src = borderPath + "multiMask.png" -imgFrameMask.src = borderPath + "frameMask.png" -imgLegendFrameMask.src = borderPath + "legendFrameMask.png" -imgBorderMask.src = borderPath + "borderMask.png" -//Card Title -document.getElementById("inputTitleColor").value = "#ffe886" -var titleFont = "40px belerenbsc" //40 -var titleFontSpacing = "0.15px" //0.15 -var titleX = 374.5 //62 -var titleY = 62 //62 -var titleAlign = "center" -//Mana Cost -var manaCostRadius = 17.5 //17.5 -var manaCostX = 657 //657 -var manaCostY = 59 //59 -//Card Type -var typeFont = "33.5px belerenb" //33.5 -var typeFontSpacing = "0.05px" //0.05 -var typeX = 60 //62 -var typeY = 601 //601 -// Rules/Flavor Text -var textFont = "px mplantin" -var textFontSpacing = 0.7 //0.7 -var textX = 66 //66 -var textY = 779 //779 -var textWidth = 687 //682 -//Power Toughness -var ptFont = "39px belerenb" //39 -var ptFontSpacing = "0.3px" //0.3 -var ptTextX = 645 //645 -var ptTextY = 939 //939 -imgBorderCreature.imgValues(571, 926, 137, 75) -//Bottom Info -var infoY = 999 //999 -//Set Symbol -var setSymbolY = 616 //616 -var setSymbolRight = 693 //693 -var setSymbolWidth = 84 //77 -var setSymbolHeight = 44 //44 -//Color Options -loadColors("white-White,blue-Blue,black-Black,red-Red,green-Green,gold-Gold,colorless-Colorless,artifact-Artifact") -document.getElementById("secondColorSelection").innerHTML = document.getElementById("colorSelection").innerHTML -document.getElementById("thirdColorSelection").innerHTML = document.getElementById("colorSelection").innerHTML -//Things The Card Can Do -legendaryBorder = true -imgBorderLegendary.imgValues(26, 20, 697, 112, "imgSecondBorderLegendary") -// nyxBorder = true -// imgBorderNyx.imgValues(30, 30, 689, 643, "imgSecondBorderNyx") -//With all the new values in place, the program will update it's border images -finishTemplate() -//Any special functions go at the bottom -var uniqueFunctionName = "bottomInfoM15" \ No newline at end of file diff --git a/data/borders/tokenText/artMask.png b/data/borders/tokenText/artMask.png deleted file mode 100644 index af22ddca..00000000 Binary files a/data/borders/tokenText/artMask.png and /dev/null differ diff --git a/data/borders/tokenText/border.js b/data/borders/tokenText/border.js new file mode 100644 index 00000000..11a0002e --- /dev/null +++ b/data/borders/tokenText/border.js @@ -0,0 +1,33 @@ +//============================================// +// Full Art Land M15 Border // +//============================================// +//General Booleans +cardData.miracle = false +cardData.nyx = false +cardData.rareStamp = false +//Specific Values +cardData.cardArtX = cwidth(56) +cardData.cardArtY = cheight(124) +cardData.manaSymbolDirection = "none" +document.getElementById("inputTitleColor").value = "#ffe886" +cardData.titleX = cardWidth / 2 +cardData.titleAlignment = "center" +cardData.titleFont = "belerenbsc" +cardData.typeY = cheight(751) +cardData.setSymbolY = cheight(739) +cardData.textY = cheight(808) +//Images +imgArtMask.load("data/borders/tokenText/imgArtMask.png") +imgFrameMask.load("data/borders/tokenText/imgFrameMask.png") +imgPinlineMask.load("data/borders/tokenText/imgPinlineMask.png") +imgTitleMask.load("data/borders/tokenText/imgTitleMask.png") +imgTypeMask.load("data/borders/tokenText/imgTypeMask.png") +imgRulesMask.load("data/borders/tokenText/imgRulesMask.png") +imgLegendary.load("none", cwidth(26), cheight(20), cwidth(697), cheight(112)) +imgLegendaryRight.load("none", cwidth(26), cheight(20), cwidth(697), cheight(112)) +//Loads the Colors +loadColors("white-White,blue-Blue,black-Black,red-Red,green-Green,gold-Gold,artifact-Artifact,colorless-Colorless") +//Runs the things! +sectionTextFunction() +sectionFrameFunction() +sectionOtherFunction() \ No newline at end of file diff --git a/data/borders/tokenText/borderMask.png b/data/borders/tokenText/borderMask.png deleted file mode 100644 index 68760f52..00000000 Binary files a/data/borders/tokenText/borderMask.png and /dev/null differ diff --git a/data/borders/tokenTall/frameMask.png b/data/borders/tokenText/imgArtMask.png similarity index 71% rename from data/borders/tokenTall/frameMask.png rename to data/borders/tokenText/imgArtMask.png index a5401f9d..a46accd3 100644 Binary files a/data/borders/tokenTall/frameMask.png and b/data/borders/tokenText/imgArtMask.png differ diff --git a/data/borders/tokenText/multiMask.png b/data/borders/tokenText/imgFrameMask.png similarity index 57% rename from data/borders/tokenText/multiMask.png rename to data/borders/tokenText/imgFrameMask.png index ce3e15d9..86919f3b 100644 Binary files a/data/borders/tokenText/multiMask.png and b/data/borders/tokenText/imgFrameMask.png differ diff --git a/data/borders/tokenText/imgPinlineMask.png b/data/borders/tokenText/imgPinlineMask.png new file mode 100644 index 00000000..c385af1d Binary files /dev/null and b/data/borders/tokenText/imgPinlineMask.png differ diff --git a/data/borders/tokenText/rulesMask.png b/data/borders/tokenText/imgRulesMask.png similarity index 100% rename from data/borders/tokenText/rulesMask.png rename to data/borders/tokenText/imgRulesMask.png diff --git a/data/borders/tokenText/imgTitleMask.png b/data/borders/tokenText/imgTitleMask.png new file mode 100644 index 00000000..00f73395 Binary files /dev/null and b/data/borders/tokenText/imgTitleMask.png differ diff --git a/data/borders/tokenText/typeMask.png b/data/borders/tokenText/imgTypeMask.png similarity index 100% rename from data/borders/tokenText/typeMask.png rename to data/borders/tokenText/imgTypeMask.png diff --git a/data/borders/tokenText/legendFrameMask.png b/data/borders/tokenText/legendFrameMask.png deleted file mode 100644 index 7198b5d9..00000000 Binary files a/data/borders/tokenText/legendFrameMask.png and /dev/null differ diff --git a/data/borders/tokenText/old.js b/data/borders/tokenText/old.js deleted file mode 100644 index 01b03bee..00000000 --- a/data/borders/tokenText/old.js +++ /dev/null @@ -1,60 +0,0 @@ -//Token Text -//Anything to do with... -//Loading Images -var artX = 56 -var artY = 125 -imgMultiMask.src = borderPath + "multiMask.png" -imgFrameMask.src = borderPath + "frameMask.png" -imgLegendFrameMask.src = borderPath + "legendFrameMask.png" -imgBorderMask.src = borderPath + "borderMask.png" -imgRulesMask.src = borderPath + "rulesMask.png" -imgTypeMask.src = borderPath + "typeMask.png" -imgTitleMask.src = borderPath + "titleMask.png" -//Card Title -document.getElementById("inputTitleColor").value = "#ffe886" -var titleFont = "40px belerenbsc" //40 -var titleFontSpacing = "0.15px" //0.15 -var titleX = 374.5 //62 -var titleY = 62 //62 -var titleAlign = "center" -//Mana Cost -var manaCostRadius = 17.5 //17.5 -var manaCostX = 657 //657 -var manaCostY = 59 //59 -//Card Type -var typeFont = "33.5px belerenb" //33.5 -var typeFontSpacing = "0.05px" //0.05 -var typeX = 60 //62 -var typeY = 719 //719 -// Rules/Flavor Text -var textFont = "px mplantin" -var textFontSpacing = 0.7 //0.7 -var textX = 66 //66 -var textY = 779 //779 -var textWidth = 682 //682 -//Power Toughness -var ptFont = "39px belerenb" //39 -var ptFontSpacing = "0.3px" //0.3 -var ptTextX = 645 //645 -var ptTextY = 939 //939 -imgBorderCreature.imgValues(571, 926, 137, 75) -//Bottom Info -var infoY = 999 //999 -//Set Symbol -var setSymbolY = 734 //616 -var setSymbolRight = 693 //693 -var setSymbolWidth = 84 //77 -var setSymbolHeight = 44 //44 -//Color Options -loadColors("white-White,blue-Blue,black-Black,red-Red,green-Green,gold-Gold,colorless-Colorless,artifact-Artifact") -document.getElementById("secondColorSelection").innerHTML = document.getElementById("colorSelection").innerHTML -document.getElementById("thirdColorSelection").innerHTML = document.getElementById("colorSelection").innerHTML -//Things The Card Can Do -legendaryBorder = true -imgBorderLegendary.imgValues(26, 20, 697, 112, "imgSecondBorderLegendary") -nyxBorder = true -imgBorderNyx.imgValues(30, 30, 689, 643, "imgSecondBorderNyx") -//With all the new values in place, the program will update it's border images -finishTemplate() -//Any special functions go at the bottom -var uniqueFunctionName = "bottomInfoM15" \ No newline at end of file diff --git a/data/borders/tokenText/titleMask.png b/data/borders/tokenText/titleMask.png deleted file mode 100644 index b72aa9ec..00000000 Binary files a/data/borders/tokenText/titleMask.png and /dev/null differ diff --git a/data/borders/tokenTextless/artMask.png b/data/borders/tokenTextless/artMask.png deleted file mode 100644 index 409886fe..00000000 Binary files a/data/borders/tokenTextless/artMask.png and /dev/null differ diff --git a/data/borders/tokenTextless/border.js b/data/borders/tokenTextless/border.js new file mode 100644 index 00000000..545f469e --- /dev/null +++ b/data/borders/tokenTextless/border.js @@ -0,0 +1,33 @@ +//============================================// +// Full Art Land M15 Border // +//============================================// +//General Booleans +cardData.miracle = false +cardData.nyx = false +cardData.rareStamp = false +cardData.rulesBox = false +//Specific Values +cardData.cardArtX = cwidth(56) +cardData.cardArtY = cheight(124) +cardData.manaSymbolDirection = "none" +document.getElementById("inputTitleColor").value = "#ffe886" +cardData.titleX = cardWidth / 2 +cardData.titleAlignment = "center" +cardData.titleFont = "belerenbsc" +cardData.typeY = cheight(901) +cardData.setSymbolY = cheight(889) +cardData.textY = cheight(296) +//Images +imgArtMask.load("data/borders/tokenTextless/imgArtMask.png") +imgFrameMask.load("data/borders/tokenTextless/imgFrameMask.png") +imgPinlineMask.load("data/borders/tokenTextless/imgPinlineMask.png") +imgTitleMask.load("data/borders/tokenTextless/imgTitleMask.png") +imgTypeMask.load("data/borders/tokenTextless/imgTypeMask.png") +imgLegendary.load("none", cwidth(26), cheight(20), cwidth(697), cheight(112)) +imgLegendaryRight.load("none", cwidth(26), cheight(20), cwidth(697), cheight(112)) +//Loads the Colors +loadColors("white-White,blue-Blue,black-Black,red-Red,green-Green,gold-Gold,artifact-Artifact,colorless-Colorless") +//Runs the things! +sectionTextFunction() +sectionFrameFunction() +sectionOtherFunction() \ No newline at end of file diff --git a/data/borders/tokenTextless/borderMask.png b/data/borders/tokenTextless/borderMask.png deleted file mode 100644 index 68760f52..00000000 Binary files a/data/borders/tokenTextless/borderMask.png and /dev/null differ diff --git a/data/borders/tokenText/frameMask.png b/data/borders/tokenTextless/imgArtMask.png similarity index 74% rename from data/borders/tokenText/frameMask.png rename to data/borders/tokenTextless/imgArtMask.png index a5401f9d..1162ceaf 100644 Binary files a/data/borders/tokenText/frameMask.png and b/data/borders/tokenTextless/imgArtMask.png differ diff --git a/data/borders/tokenTextless/multiMask.png b/data/borders/tokenTextless/imgFrameMask.png similarity index 61% rename from data/borders/tokenTextless/multiMask.png rename to data/borders/tokenTextless/imgFrameMask.png index 147ceaf0..99abeb3d 100644 Binary files a/data/borders/tokenTextless/multiMask.png and b/data/borders/tokenTextless/imgFrameMask.png differ diff --git a/data/borders/tokenTextless/imgPinlineMask.png b/data/borders/tokenTextless/imgPinlineMask.png new file mode 100644 index 00000000..e1dbb7a7 Binary files /dev/null and b/data/borders/tokenTextless/imgPinlineMask.png differ diff --git a/data/borders/tokenTextless/imgTitleMask.png b/data/borders/tokenTextless/imgTitleMask.png new file mode 100644 index 00000000..00f73395 Binary files /dev/null and b/data/borders/tokenTextless/imgTitleMask.png differ diff --git a/data/borders/tokenTextless/frameMask.png b/data/borders/tokenTextless/imgTypeMask.png similarity index 62% rename from data/borders/tokenTextless/frameMask.png rename to data/borders/tokenTextless/imgTypeMask.png index a5401f9d..79f165bf 100644 Binary files a/data/borders/tokenTextless/frameMask.png and b/data/borders/tokenTextless/imgTypeMask.png differ diff --git a/data/borders/tokenTextless/legendFrameMask.png b/data/borders/tokenTextless/legendFrameMask.png deleted file mode 100644 index 7198b5d9..00000000 Binary files a/data/borders/tokenTextless/legendFrameMask.png and /dev/null differ diff --git a/data/main.js b/data/main.js index 97677366..b7b01639 100644 --- a/data/main.js +++ b/data/main.js @@ -159,6 +159,11 @@ CanvasRenderingContext2D.prototype.writeText = function(text, inputX, inputY, in } if (skipLines == false) { //The text is condensed into one line + if (textAlignment == "center") { + rightLimit = rightLimit + (rightLimit - x) + } else if (textAlignment == "right") { + rightLimit = 2 * x - rightLimit + } while(this.measureText(text).width + x > rightLimit) { textFontSize -= 0.5 this.font = textFontSize + "px " + textFont @@ -975,12 +980,12 @@ function checkCookies() { alert("Thanks for using Card Conjurer! Unfortunately different browsers treat custom fonts differently and it appears that you are using a browser other than Chrome. Everything may work perfectly, but if you notice that the text looks odd try switching to Chrome.") } setCookie("visited", "true") - setCookie("updated_2", "true") + setCookie("cookieUpdated3", "true") } else { console.log("Welcome back to Card Conjurer!") - if (getCookie("updated_2") != "true") { - alert("Card Conjurer has been updated since your last visit. After reworking the system I haven't had time to add all the old border styles back, but feel free to contact me at CardConjurerMTG@gmail.com if you would like to request a border style or have any questions. \r\n\r\nNewest border style: Mini-Plane") - setCookie("updated_2", "true") + if (getCookie("cookieUpdated3") != "true") { + alert("Card Conjurer has been updated since your last visit. After reworking the system I haven't had time to add all the old border styles back, but feel free to contact me at CardConjurerMTG@gmail.com if you would like to request a border style or have any questions. \r\n\r\nNewest border style: Tokens") + setCookie("cookieUpdated3", "true") } else { console.log("There are no new updates since your last visit.") if (getCookie("donationRequest") != "true") { @@ -1014,7 +1019,7 @@ setTimeout(function(){sectionTextFunction()}, 500) setTimeout(function(){sectionTextFunction()}, 1000) // Only for working on frames n' stuff :) // setTimeout(function(){ -// document.getElementById("inputCardVersion").value = "miniplane" +// document.getElementById("inputCardVersion").value = "tokenTextless" // document.getElementById("inputCardVersion").onchange() // }, 500) @@ -1085,43 +1090,4 @@ setTimeout(function(){sectionTextFunction()}, 1000) // typeRightShift = 33 // } else { // typeRightShift = 0 -// } - - -// //============================================// -// // Cookies! // -// //============================================// -// function setCookie(cookieName, cookieValue) { -// var tempDate = new Date(); -// tempDate.setTime(tempDate.getTime() + (31 * 24 * 60 * 60 * 1000)); //days*hours*minutes*seconds*milliseconds -// var expires = "expires=" + tempDate.toUTCString(); -// document.cookie = cookieName + "=" + cookieValue + ";" + expires + ";path=/"; -// } -// function getCookie(cookieName) { -// var name = cookieName + "="; -// var cookieArray = document.cookie.split(";"); -// for(var i = 0; i < cookieArray.length; i++) { -// var tempCookie = cookieArray[i]; -// while (tempCookie.charAt(0) == " ") { -// tempCookie = tempCookie.substring(1); -// } -// if (tempCookie.indexOf(name) == 0) { -// return tempCookie.substring(name.length, tempCookie.length); -// } -// } -// return ""; -// } -// function checkCookies() { -// if (getCookie("visited") != "true") { -// if (isMobile == true) { -// alert("Thanks for using Card Conjurer! Unfortunately some users have been experiencing difficulty on mobile devices when uploading pictures they took on that mobile device. An easy solution is to quickly edit that picture by cropping it slightly. Otherwise, images from URLs and other sources should work normally.") -// } else if (isSafari == false && isChrome == false) { -// alert("Thanks for using Card Conjurer! Unfortunately different browsers treat custom fonts differently and it appears that you are using a browser other than Safari or Chrome. Everything may work perfectly, but if you notice that the cards look odd try using Safari or Chrome.") -// } -// setCookie("visited", "true") -// } else { -// console.log("Welcome back to Card Conjurer!") -// } -// } - -// checkCookies() +// } \ No newline at end of file diff --git a/index.html b/index.html index 0c965ee4..d62b6750 100644 --- a/index.html +++ b/index.html @@ -89,6 +89,9 @@