forked from GithubMirrors/cardconjurer
		
	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) | ||||||
|  | 	document.addEventListener("mouseup", decoyMouseUpFunction) | ||||||
|  | 	window.addEventListener("touchstart", switchToTouchEvents) | ||||||
|  | } | ||||||
|  | function decoyMouseDownFunction() { | ||||||
|  | 	alert("IT'S STILL CLICKING") | ||||||
| 	mouseDownPlayerBox(this, event.clientX, event.clientY) | 	mouseDownPlayerBox(this, event.clientX, event.clientY) | ||||||
| 		alert("It's still clicking!") | } | ||||||
| 	}) | function decoyMouseUpFunction() { | ||||||
| 	document.addEventListener("mouseup", function() { |  | ||||||
| 	mouseUpPlayerBox(this) | 	mouseUpPlayerBox(this) | ||||||
| 	}) |  | ||||||
| 	window.addEventListener("touchstart", function() { |  | ||||||
| 		switchToTouchEvents() |  | ||||||
| 	}) |  | ||||||
| } | } | ||||||
| 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
	 Kyle
					Kyle