mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 05:14:53 -05:00
life
This commit is contained in:
@@ -94,6 +94,8 @@ function playerBox(playerBoxID, canvasRotation, wide) {
|
||||
this.color = "#222222"
|
||||
this.textColor = "#ffffff"
|
||||
this.image = new Image()
|
||||
this.image.customVarID = playerBoxID
|
||||
this.image.onload = function() {drawPlayerBox(this.customVarID)}
|
||||
//vars to make navigation easier
|
||||
this.canvas.customVarID = playerBoxID
|
||||
this.canvas.customVarContext = this.canvas.getContext("2d")
|
||||
@@ -144,7 +146,7 @@ function loadImage(event, destination) {
|
||||
reader.onload = function() {
|
||||
var dataURL = reader.result
|
||||
destination.src = dataURL
|
||||
setTimeout(function(){drawPlayerBox(parseInt(document.getElementById("inputPlayer").value))}, 500)
|
||||
// setTimeout(function(){drawPlayerBox(parseInt(document.getElementById("inputPlayer").value))}, 500)
|
||||
}
|
||||
reader.readAsDataURL(input.files[0])
|
||||
}
|
||||
@@ -173,7 +175,7 @@ function inputCardArtName(cardArtNameInput) {
|
||||
}
|
||||
function inputCardArtNameNumber(cardArtNameNumberInput) {
|
||||
playerList[parseInt(document.getElementById('inputPlayer').value) - 1].image.src = cardArtUrlList[cardArtNameNumberInput - 1]
|
||||
setTimeout(function(){drawPlayerBox(parseInt(document.getElementById("inputPlayer").value))}, 500)
|
||||
// setTimeout(function(){drawPlayerBox(parseInt(document.getElementById("inputPlayer").value))}, 500)
|
||||
}
|
||||
document.getElementById("mainGrid").addEventListener("touchmove", function(event) {
|
||||
event.preventDefault()
|
||||
|
@@ -70,7 +70,7 @@
|
||||
<button onclick="updateBackgroundColor('#222222')">Default</button><br>
|
||||
Image:<br>
|
||||
<input type="file" accept="image/*" onchange="loadImage(event, playerList[parseInt(document.getElementById('inputPlayer').value) - 1].image)" placeholder="Via File Upload"><br>
|
||||
<input type="text" placeholder="Via URL" onchange="playerList[parseInt(document.getElementById('inputPlayer').value) - 1].image.src = this.value;setTimeout(function(){drawPlayerBox(parseInt(document.getElementById('inputPlayer').value))}, 1000)"><br>
|
||||
<input type="text" placeholder="Via URL" onchange="playerList[parseInt(document.getElementById('inputPlayer').value) - 1].image.src = this.value"><br>
|
||||
<input id="inputCardArtName" onchange="inputCardArtName(this.value)" type="text" placeholder="Via Card Name"><br>
|
||||
<input id="inputCardArtNameNumber" onchange="inputCardArtNameNumber(this.value)" type="number" value="1" min="1" max="1"><br><br>
|
||||
Text Color:<br>
|
||||
|
Reference in New Issue
Block a user