Update CardConjurer.html

This commit is contained in:
Kyle
2018-09-03 19:53:24 -07:00
committed by GitHub
parent 4c08a2bf97
commit 55a0749a2d

View File

@@ -1,13 +1,13 @@
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html> <html>
<head> <head>
<title>CardForge - Custom Magic Card Maker</title> <title>Card Conjurer - Custom Magic Card Maker</title>
<script src="data/scripts/loadScript.js"></script> <script src="data/scripts/loadScript.js"></script>
<script src="data/scripts/loadImage.js"></script> <script src="data/scripts/loadImage.js"></script>
<script src="data/scripts/loadColors.js"></script> <script src="data/scripts/loadColors.js"></script>
<script src="data/scripts/mask.js"></script> <script src="data/scripts/mask.js"></script>
<!--<script src="data/scripts/autocrop.js"></script> This is no longer required, but possibly could be in the future --> <!--<script src="data/scripts/autocrop.js"></script> This is no longer required, but possibly could be in the future -->
<div class="title">CardForge</div> <div class="title">Card Conjurer</div>
</head> </head>
<!-- <img src="data/background.png"></img> --> <!-- <img src="data/background.png"></img> -->
<body> <body>
@@ -114,13 +114,13 @@
</div> </div>
<div class="toggle" onclick="toggleVisibility('setSymbolWatermark', this, 'toggleShown', 'hidden', 'shown')">Set Symbol and Watermark</div> <div class="toggle" onclick="toggleVisibility('setSymbolWatermark', this, 'toggleShown', 'hidden', 'shown')">Set Symbol and Watermark</div>
<div class="setSymbolWatermark hidden"> <div class="setSymbolWatermark hidden">
<input type="checkbox" id="setSymbolCheckbox" checked="true">Set Symbol</input> <input type="checkbox" id="setSymbolCheckbox" checked="true">Set Symbol</input>
<br> <br>
Set Code Set Code
<input type="text" onchange="loadSetSymbol()" value="HM" id="setSymbolCode"></input> <input type="text" onchange="loadSetSymbol()" value="HM" id="setSymbolCode"></input>
<br> <br>
Set Symbol Rarity Set Symbol Rarity
<input type="text" onchange="loadSetSymbol()" value="C" id="setSymbolRarity"></input> <input type="text" onchange="loadSetSymbol()" value="C" id="setSymbolRarity"></input>
<br> <br>
Custom Set Symbol Custom Set Symbol
<input type="file" accept="image/*" onchange="loadImage(event, imgSetSymbol, true)" id="inputSetSymbol"></input> <input type="file" accept="image/*" onchange="loadImage(event, imgSetSymbol, true)" id="inputSetSymbol"></input>
@@ -231,7 +231,7 @@
<br/><br/><br/><br/><br/><br/><br/> <!-- Not quite sure why I needed so many linebreaks here! --> <br/><br/><br/><br/><br/><br/><br/> <!-- Not quite sure why I needed so many linebreaks here! -->
When selecting the card's color, use 'Second Color' for hybrid cards, and 'Third Color' for non-hybrid two-colored cards. When selecting the card's color, use 'Second Color' for hybrid cards, and 'Third Color' for non-hybrid two-colored cards.
</div> </div>
<div class="info">For Terms of Use and Disclaimer, see <a href="https://github.com/ImKyle4815/CardForge" target="_blank">the Github page</a>.</div> <div class="info">For Terms of Use and Disclaimer, see <a href="https://github.com/ImKyle4815/CardConjurer" target="_blank">the Github page</a>.</div>
</body> </body>
@@ -414,12 +414,12 @@ for (var i = 0; i < manaSymbolCode.length; i++) {
if (document.getElementById(manaSymbolCode[i]) != null) { if (document.getElementById(manaSymbolCode[i]) != null) {
document.getElementById(manaSymbolCode[i]).src = "data/manaSymbols/" + i + ".png" document.getElementById(manaSymbolCode[i]).src = "data/manaSymbols/" + i + ".png"
} }
} }
//load first set symbol //load first set symbol
loadSetSymbol() loadSetSymbol()
//fill second watermark dropdown menu //fill second watermark dropdown menu
document.getElementById("secondWatermarkColorSelection").innerHTML = document.getElementById("watermarkColorSelection").innerHTML document.getElementById("secondWatermarkColorSelection").innerHTML = document.getElementById("watermarkColorSelection").innerHTML
//Runs ten times every second (main loop) //Runs ten times every second (main loop)
updateBorder() updateBorder()
@@ -653,14 +653,14 @@ function bottomInfoM15() {
if (445 < artistBrushShift + 21 + card.measureText(document.getElementById("inputArtist").value).width && document.getElementById("creatureCheckbox").checked == true) { if (445 < artistBrushShift + 21 + card.measureText(document.getElementById("inputArtist").value).width && document.getElementById("creatureCheckbox").checked == true) {
shiftInfo = artistBrushShift + card.measureText(document.getElementById("inputArtist").value).width + 26 shiftInfo = artistBrushShift + card.measureText(document.getElementById("inputArtist").value).width + 26
} }
//This is where "CF —" is hardcoded. The only reason is to prevent users from easily typing in the trademark and copyright that's usually on real cards. It's also there so I can see if a card was created with my program, it makes me feel good :) //This is where "CC —" is hardcoded. The only reason is to prevent users from easily typing in the trademark and copyright that's usually on real cards. It's also there so I can see if a card was created with my program, it makes me feel good :)
if (document.getElementById("inputInfo").value != "") { if (document.getElementById("inputInfo").value != "") {
canvas.style.letterSpacing = "0px" canvas.style.letterSpacing = "0px"
card.font = "17px mplantin" card.font = "17px mplantin"
if (document.getElementById("creatureCheckbox").checked == true) { if (document.getElementById("creatureCheckbox").checked == true) {
card.fillText("CF \u2014 " + document.getElementById("inputInfo").value, shiftInfo, m15InfoY + 3) card.fillText("CC \u2014 " + document.getElementById("inputInfo").value, shiftInfo, m15InfoY + 3)
} else { } else {
card.fillText("CF \u2014 " + document.getElementById("inputInfo").value, shiftInfo, m15InfoY - 17) card.fillText("CC \u2014 " + document.getElementById("inputInfo").value, shiftInfo, m15InfoY - 17)
} }
} }
} }
@@ -676,7 +676,7 @@ function bottomInfo8th() {
card.fillText(document.getElementById("inputArtist").value, 116, eighthInfoY) card.fillText(document.getElementById("inputArtist").value, 116, eighthInfoY)
canvas.style.letterSpacing = "0.5px" canvas.style.letterSpacing = "0.5px"
card.font = "16px mplantin" card.font = "16px mplantin"
card.fillText("CF \u2014 " + document.getElementById("inputInfo").value + " " + document.getElementById("inputNumber").value, 62, eighthInfoY + 31) card.fillText("CC \u2014 " + document.getElementById("inputInfo").value + " " + document.getElementById("inputNumber").value, 62, eighthInfoY + 31)
} }
//Write rules and flavor text //Write rules and flavor text
@@ -772,11 +772,11 @@ function toggleVisibility(targetClass, self, selfClass, hiddenClass, shownClass)
elementList[i].classList.toggle(hiddenClass) elementList[i].classList.toggle(hiddenClass)
elementList[i].classList.toggle(shownClass) elementList[i].classList.toggle(shownClass)
} }
} }
//runs the autocrop function for the chosen set symbol //runs the autocrop function for the chosen set symbol
function loadSetSymbol() { function loadSetSymbol() {
imgSetSymbol.src = "https://raw.githubusercontent.com/ImKyle4815/MTG-Set-Symbols/master/setSymbols/" + document.getElementById("setSymbolCode").value.toUpperCase() + "_" + document.getElementById("setSymbolRarity").value.toUpperCase() + ".png" imgSetSymbol.src = "https://raw.githubusercontent.com/ImKyle4815/MTG-Set-Symbols/master/setSymbols/" + document.getElementById("setSymbolCode").value.toUpperCase() + "_" + document.getElementById("setSymbolRarity").value.toUpperCase() + ".png"
} }
</script> </script>
<html> <html>