This commit is contained in:
Kyle
2019-08-10 16:15:59 -07:00
parent d7b54a253b
commit b3c658ea0b
2 changed files with 13 additions and 13 deletions

View File

@@ -143,16 +143,16 @@ function playerBox(playerBoxID, canvasRotation, wide) {
this.canvas.classList.add("widePlayerBox")
}
document.getElementById("mainGrid").appendChild(this.canvas)
this.canvas.addEventListener("mousedown", function() {
this.canvas.addEventListener("mousedown", decoyMouseDownFunction)
document.addEventListener("mouseup", decoyMouseUpFunction)
window.addEventListener("touchstart", switchToTouchEvents)
}
function decoyMouseDownFunction() {
alert("IT'S STILL CLICKING")
mouseDownPlayerBox(this, event.clientX, event.clientY)
alert("It's still clicking!")
})
document.addEventListener("mouseup", function() {
}
function decoyMouseUpFunction() {
mouseUpPlayerBox(this)
})
window.addEventListener("touchstart", function() {
switchToTouchEvents()
})
}
function configurePlayerBox(playerBoxID) {
var currentPlayer = playerList[playerBoxID - 1]
@@ -224,8 +224,8 @@ function updateBackgroundColor(color) {
function switchToTouchEvents() {
document.removeEventListener("mousedown")
document.removeEventListener("mouseup")
document.removeEventListener("mousedown", decoyMouseDownFunction)
document.removeEventListener("mouseup", decoyMouseUpFunction)
document.addEventListener("touchstart", function() {
mouseDownPlayerBox(this, event.clientX, event.clientY)
})

View File

@@ -197,7 +197,7 @@
margin: 90pt 0px 0px 0px;
padding: 20pt;
overflow-y: scroll;
max-height: calc(100% - 90pt);
height: calc(100% - 90pt);
border: 1px solid white;
}
.menuOption {