mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 21:31:39 -05:00
fix
This commit is contained in:
@@ -90,9 +90,10 @@ function init() {
|
|||||||
}
|
}
|
||||||
//Runs any tests. This should not do anything when published.
|
//Runs any tests. This should not do anything when published.
|
||||||
setTimeout(testFunction, 100)
|
setTimeout(testFunction, 100)
|
||||||
checkCookies()
|
|
||||||
initiated = true
|
initiated = true
|
||||||
textCodeTutorial()
|
textCodeTutorial()
|
||||||
|
//Checks cookies!
|
||||||
|
setTimeout(checkCookies, 100)
|
||||||
}
|
}
|
||||||
//Loads an image. Only actually loads images the first time each image is loaded, otherwise assigns it.
|
//Loads an image. Only actually loads images the first time each image is loaded, otherwise assigns it.
|
||||||
function loadImage(index, target = "none") {
|
function loadImage(index, target = "none") {
|
||||||
@@ -331,10 +332,22 @@ function changeVersionTo(versionToChangeTo) {
|
|||||||
loadScript("data/versions/" + versionToChangeTo + "Version.js")
|
loadScript("data/versions/" + versionToChangeTo + "Version.js")
|
||||||
}
|
}
|
||||||
function finishChangingVersion() {
|
function finishChangingVersion() {
|
||||||
|
hideShowFrameTypes()
|
||||||
|
for (var i = 0; i < version.textList.length; i ++) {
|
||||||
|
document.getElementById("inputWhichTextTabs").innerHTML += "<div class='tabButton text' onclick='tabFunction(event, `text`, `option" + version.textList[i][0] + "`, `textTabFunction`)'>" + version.textList[i][0] + "</div>"
|
||||||
|
if (i == 0) {
|
||||||
|
document.getElementsByClassName("tabButton text")[0].classList.add("activeTab")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateText()
|
||||||
|
updateBottomInfoCanvas()
|
||||||
|
updateSetSymbolCanvas()
|
||||||
|
}
|
||||||
|
function hideShowFrameTypes() {
|
||||||
document.getElementById("frameType").innerHTML = ""
|
document.getElementById("frameType").innerHTML = ""
|
||||||
document.getElementById("inputImageTypeOpacity").innerHTML = ""
|
document.getElementById("inputImageTypeOpacity").innerHTML = ""
|
||||||
for (var i = 0; i < version.typeOrder.length; i ++) {
|
for (var i = 0; i < version.typeOrder.length; i ++) {
|
||||||
if (!version.typeOrder[i].includes("Secondary")) {
|
if (!version.typeOrder[i].includes("Secondary") && (!version.typesAdvanced.includes(version.typeOrder[i]) || document.getElementById("checkboxAdvanced").checked)) {
|
||||||
tabSelectAddOption("frameType", version.typeOrder[i], version.typeOrder[i])
|
tabSelectAddOption("frameType", version.typeOrder[i], version.typeOrder[i])
|
||||||
if (window[version.currentVersion + "Mask" + version.typeOrder[i]]) {
|
if (window[version.currentVersion + "Mask" + version.typeOrder[i]]) {
|
||||||
document.getElementById("inputImageTypeOpacity").innerHTML += "<option>" + version.typeOrder[i] + "</option>"
|
document.getElementById("inputImageTypeOpacity").innerHTML += "<option>" + version.typeOrder[i] + "</option>"
|
||||||
@@ -342,19 +355,10 @@ function finishChangingVersion() {
|
|||||||
cardMasterOpacityValue[cardMasterOpacityValue.length] = 100
|
cardMasterOpacityValue[cardMasterOpacityValue.length] = 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
document.getElementsByClassName("frameType")[0].className += " activeTab"
|
document.getElementsByClassName("frameType")[0].className += " activeTab"
|
||||||
for (var i = 0; i < version.textList.length; i ++) {
|
hideShowColors(true)
|
||||||
document.getElementById("inputWhichTextTabs").innerHTML += "<div class='tabButton text' onclick='tabFunction(event, `text`, `option" + version.textList[i][0] + "`, `textTabFunction`)'>" + version.textList[i][0] + "</div>"
|
loadOpacityValue()
|
||||||
if (i == 0) {
|
|
||||||
document.getElementsByClassName("tabButton text")[0].classList.add("activeTab")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
hideShowColors(true)
|
|
||||||
loadOpacityValue()
|
|
||||||
updateText()
|
|
||||||
updateBottomInfoCanvas()
|
|
||||||
updateSetSymbolCanvas()
|
|
||||||
}
|
}
|
||||||
//Hides and shows the options in inputImageColor to match the selected type
|
//Hides and shows the options in inputImageColor to match the selected type
|
||||||
function hideShowColors(enter = false) {
|
function hideShowColors(enter = false) {
|
||||||
@@ -369,7 +373,7 @@ function hideShowColors(enter = false) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!activeTab && document.getElementsByClassName("tabSelectColor")[0].className != undefined) {
|
if (!activeTab && document.getElementsByClassName("tabSelectColor").length > 0) {
|
||||||
document.getElementsByClassName("tabSelectColor")[0].className += " activeTab"
|
document.getElementsByClassName("tabSelectColor")[0].className += " activeTab"
|
||||||
}
|
}
|
||||||
if (enter) {
|
if (enter) {
|
||||||
@@ -749,7 +753,9 @@ function checkCookies() {
|
|||||||
}
|
}
|
||||||
if (getCookie("advancedBorders") == "true") {
|
if (getCookie("advancedBorders") == "true") {
|
||||||
document.getElementById("tooltipToggler").checked = true
|
document.getElementById("tooltipToggler").checked = true
|
||||||
hideShowColors()
|
hideShowFrameTypes()
|
||||||
|
} else {
|
||||||
|
console.log(getCookie("advancedBorders"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -842,13 +848,13 @@ function textCodeTutorial() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function advancedBordersClicked() {
|
function advancedBordersClicked() {
|
||||||
hideShowColors()
|
hideShowFrameTypes()
|
||||||
setCookie("advancedBorders", document.getElementById("checkboxAdvanced").checked + "")
|
setCookie("advancedBorders", document.getElementById("checkboxAdvanced").checked + "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
textCodeTutorial()
|
//textCodeTutorial()
|
||||||
|
|
||||||
|
|
||||||
/*To do list:
|
/*To do list:
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
//============================================//
|
//============================================//
|
||||||
version.currentVersion = "m15"
|
version.currentVersion = "m15"
|
||||||
version.typeOrder = ["Full", "FullSecondary", "Frame", "FrameSecondary", "Nyx", "NyxSecondary", "Pinline", "PinlineSecondary", "Legendary", "LegendarySecondary", "Title", "TitleSecondary", "Miracle", "MiracleSecondary", "Type", "TypeSecondary", "Rules", "RulesSecondary", "PT", "RareStamp", "RareStampSecondary", "FlipPT", "FlipCircle", "FlipIcon"]
|
version.typeOrder = ["Full", "FullSecondary", "Frame", "FrameSecondary", "Nyx", "NyxSecondary", "Pinline", "PinlineSecondary", "Legendary", "LegendarySecondary", "Title", "TitleSecondary", "Miracle", "MiracleSecondary", "Type", "TypeSecondary", "Rules", "RulesSecondary", "PT", "RareStamp", "RareStampSecondary", "FlipPT", "FlipCircle", "FlipIcon"]
|
||||||
|
version.typesAdvanced = ["Nyx", "Miracle", "FlipPT", "FlipCircle", "FlipIcon"]
|
||||||
version.typeNotFull = ["Legendary", "LegendarySecondary", "PT", "RareStamp", "RareStampSecondary", "Nyx", "NyxSecondary", "Miracle", "MiracleSecondary", "FlipPT", "FlipCircle", "FlipIcon"]
|
version.typeNotFull = ["Legendary", "LegendarySecondary", "PT", "RareStamp", "RareStampSecondary", "Nyx", "NyxSecondary", "Miracle", "MiracleSecondary", "FlipPT", "FlipCircle", "FlipIcon"]
|
||||||
version.artX = cwidth(58)
|
version.artX = cwidth(58)
|
||||||
version.artY = cheight(118)
|
version.artY = cheight(118)
|
||||||
|
Reference in New Issue
Block a user