mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 21:31:39 -05:00
life
This commit is contained in:
@@ -143,16 +143,16 @@ function playerBox(playerBoxID, canvasRotation, wide) {
|
|||||||
this.canvas.classList.add("widePlayerBox")
|
this.canvas.classList.add("widePlayerBox")
|
||||||
}
|
}
|
||||||
document.getElementById("mainGrid").appendChild(this.canvas)
|
document.getElementById("mainGrid").appendChild(this.canvas)
|
||||||
this.canvas.addEventListener("mousedown", function() {
|
this.canvas.addEventListener("mousedown", decoyMouseDownFunction)
|
||||||
mouseDownPlayerBox(this, event.clientX, event.clientY)
|
document.addEventListener("mouseup", decoyMouseUpFunction)
|
||||||
alert("It's still clicking!")
|
window.addEventListener("touchstart", switchToTouchEvents)
|
||||||
})
|
}
|
||||||
document.addEventListener("mouseup", function() {
|
function decoyMouseDownFunction() {
|
||||||
mouseUpPlayerBox(this)
|
alert("IT'S STILL CLICKING")
|
||||||
})
|
mouseDownPlayerBox(this, event.clientX, event.clientY)
|
||||||
window.addEventListener("touchstart", function() {
|
}
|
||||||
switchToTouchEvents()
|
function decoyMouseUpFunction() {
|
||||||
})
|
mouseUpPlayerBox(this)
|
||||||
}
|
}
|
||||||
function configurePlayerBox(playerBoxID) {
|
function configurePlayerBox(playerBoxID) {
|
||||||
var currentPlayer = playerList[playerBoxID - 1]
|
var currentPlayer = playerList[playerBoxID - 1]
|
||||||
@@ -224,8 +224,8 @@ function updateBackgroundColor(color) {
|
|||||||
|
|
||||||
|
|
||||||
function switchToTouchEvents() {
|
function switchToTouchEvents() {
|
||||||
document.removeEventListener("mousedown")
|
document.removeEventListener("mousedown", decoyMouseDownFunction)
|
||||||
document.removeEventListener("mouseup")
|
document.removeEventListener("mouseup", decoyMouseUpFunction)
|
||||||
document.addEventListener("touchstart", function() {
|
document.addEventListener("touchstart", function() {
|
||||||
mouseDownPlayerBox(this, event.clientX, event.clientY)
|
mouseDownPlayerBox(this, event.clientX, event.clientY)
|
||||||
})
|
})
|
||||||
|
@@ -197,7 +197,7 @@
|
|||||||
margin: 90pt 0px 0px 0px;
|
margin: 90pt 0px 0px 0px;
|
||||||
padding: 20pt;
|
padding: 20pt;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
max-height: calc(100% - 90pt);
|
height: calc(100% - 90pt);
|
||||||
border: 1px solid white;
|
border: 1px solid white;
|
||||||
}
|
}
|
||||||
.menuOption {
|
.menuOption {
|
||||||
|
Reference in New Issue
Block a user