forked from GithubMirrors/cardconjurer
		
	life
This commit is contained in:
		@@ -6,7 +6,7 @@ var playerCount, startingLifeTotal, firstPlayerWide = false, lastPlayerWide = fa
 | 
				
			|||||||
//This function sets everything up
 | 
					//This function sets everything up
 | 
				
			||||||
function fullscreen() {
 | 
					function fullscreen() {
 | 
				
			||||||
	//Full screen!
 | 
						//Full screen!
 | 
				
			||||||
	grid = document.getElementById("mainGrid")
 | 
						grid = document.getElementById("gridShell")
 | 
				
			||||||
	if (grid.requestFullscreen) {
 | 
						if (grid.requestFullscreen) {
 | 
				
			||||||
    	grid.requestFullscreen()
 | 
					    	grid.requestFullscreen()
 | 
				
			||||||
  	} else if (grid.mozRequestFullScreen) {
 | 
					  	} else if (grid.mozRequestFullScreen) {
 | 
				
			||||||
@@ -18,7 +18,7 @@ function fullscreen() {
 | 
				
			|||||||
  	} else {
 | 
					  	} else {
 | 
				
			||||||
  		// alert("Unfortunately fullscreen is unavailable for your device. If it's an iPhone, I'd recommend tapping the share button and selecting 'Add to Home Screen.' Running it from your home screen should provide a much better experience.")
 | 
					  		// alert("Unfortunately fullscreen is unavailable for your device. If it's an iPhone, I'd recommend tapping the share button and selecting 'Add to Home Screen.' Running it from your home screen should provide a much better experience.")
 | 
				
			||||||
  		document.getElementById("return").classList.add("permaHidden")
 | 
					  		document.getElementById("return").classList.add("permaHidden")
 | 
				
			||||||
  		document.getElementById("mainGrid").classList.add("fullscreenUnavailable")
 | 
					  		document.getElementById("gridShell").classList.add("fullscreenUnavailable")
 | 
				
			||||||
  	}
 | 
					  	}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
function startGame() {
 | 
					function startGame() {
 | 
				
			||||||
@@ -188,3 +188,9 @@ function mouseUpPlayerBox() {
 | 
				
			|||||||
		playerList[i - 1].canvas.customVarMouseDelay = 0
 | 
							playerList[i - 1].canvas.customVarMouseDelay = 0
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					function resetLife() {
 | 
				
			||||||
 | 
						for (var i = 1; i <= playerCount; i++) {
 | 
				
			||||||
 | 
							playerList[i - 1].life = startingLifeTotal
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						document.getElementById('menu').classList.add('hidden')
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								data/life/menuButton.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								data/life/menuButton.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 810 B  | 
							
								
								
									
										
											BIN
										
									
								
								data/life/menuExitButton.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								data/life/menuExitButton.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.8 KiB  | 
							
								
								
									
										73
									
								
								life.html
									
									
									
									
									
								
							
							
						
						
									
										73
									
								
								life.html
									
									
									
									
									
								
							@@ -50,7 +50,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<body>
 | 
					<body>
 | 
				
			||||||
	<div id="settings">
 | 
						<div id="settings" class="settings">
 | 
				
			||||||
		Number of Players:<br>
 | 
							Number of Players:<br>
 | 
				
			||||||
		<input id="inputPlayerCount" class="input" type="number" min="2" value="6" max="16"><br>
 | 
							<input id="inputPlayerCount" class="input" type="number" min="2" value="6" max="16"><br>
 | 
				
			||||||
		Starting Life Total:<br>
 | 
							Starting Life Total:<br>
 | 
				
			||||||
@@ -58,8 +58,16 @@
 | 
				
			|||||||
		<button id="buttonStartGame" class="input" onclick="startGame()">Game On!</button>
 | 
							<button id="buttonStartGame" class="input" onclick="startGame()">Game On!</button>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
	<div onclick="fullscreen()" class="hidden" id="return">CLICK ANYWHERE TO RETURN TO FULLSCREEN</div>
 | 
						<div onclick="fullscreen()" class="hidden" id="return">CLICK ANYWHERE TO RETURN TO FULLSCREEN</div>
 | 
				
			||||||
	<div id="mainGrid" class="mainGrid">
 | 
						<div id="gridShell">
 | 
				
			||||||
		
 | 
							<img id="menuButton" class="menuButton" src="data/life/menuButton.png" onclick="document.getElementById('menu').classList.remove('hidden')">
 | 
				
			||||||
 | 
							<div id="menu" class="menu hidden">
 | 
				
			||||||
 | 
								<img class="menuExitButton" src="data/life/menuExitButton.png" onclick="document.getElementById('menu').classList.add('hidden')">
 | 
				
			||||||
 | 
								<div class="menuInterior">
 | 
				
			||||||
 | 
									<div class="menuOption" onclick="resetLife()">Reset Life Totals</div><br>
 | 
				
			||||||
 | 
									<div class="menuOption" onclick="location.reload()">Change Player Count</div>
 | 
				
			||||||
 | 
								</div>
 | 
				
			||||||
 | 
							</div>
 | 
				
			||||||
 | 
							<div id="mainGrid" class="mainGrid"></div>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</body>
 | 
					</body>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -103,7 +111,9 @@
 | 
				
			|||||||
		src: url("data/fonts/goudy-medieval.ttf");
 | 
							src: url("data/fonts/goudy-medieval.ttf");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						.settings {
 | 
				
			||||||
 | 
							margin: 2vw;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	* {
 | 
						* {
 | 
				
			||||||
		user-select: none;
 | 
							user-select: none;
 | 
				
			||||||
		font-family: belerenbsc;
 | 
							font-family: belerenbsc;
 | 
				
			||||||
@@ -121,12 +131,14 @@
 | 
				
			|||||||
		width: 100%;
 | 
							width: 100%;
 | 
				
			||||||
		height: 100%;
 | 
							height: 100%;
 | 
				
			||||||
		align-items: center;
 | 
							align-items: center;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						#gridShell {
 | 
				
			||||||
		display: none;
 | 
							display: none;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	.mainGrid:fullscreen {
 | 
						#gridShell:fullscreen {
 | 
				
			||||||
		display: inline-block;
 | 
							display: inline-block;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	.mainGrid.fullscreenUnavailable {
 | 
						#gridShell.fullscreenUnavailable {
 | 
				
			||||||
		display: inline-block;
 | 
							display: inline-block;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	.playerBox {
 | 
						.playerBox {
 | 
				
			||||||
@@ -139,18 +151,55 @@
 | 
				
			|||||||
	.widePlayerBox {
 | 
						.widePlayerBox {
 | 
				
			||||||
		grid-column: 1 / span 2;
 | 
							grid-column: 1 / span 2;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	.hidden {
 | 
					 | 
				
			||||||
		display: none;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	.permaHidden {
 | 
					 | 
				
			||||||
		display: none;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	#return {
 | 
						#return {
 | 
				
			||||||
		width: 100%;
 | 
							width: 100%;
 | 
				
			||||||
		height: 100%;
 | 
							height: 100%;
 | 
				
			||||||
		color: white;
 | 
							color: white;
 | 
				
			||||||
		font-size: 3vw;
 | 
							font-size: 3vw;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						.menuButton {
 | 
				
			||||||
 | 
							position: fixed;
 | 
				
			||||||
 | 
							top: calc(50% - 7.5vw);
 | 
				
			||||||
 | 
							left: calc(50% - 7.5vw);
 | 
				
			||||||
 | 
							width: 15vw;
 | 
				
			||||||
 | 
							height: 15vw;
 | 
				
			||||||
 | 
							border: 1px solid white;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						.menuExitButton {
 | 
				
			||||||
 | 
							position: fixed;
 | 
				
			||||||
 | 
							top: 1vw;
 | 
				
			||||||
 | 
							right: 1vw;
 | 
				
			||||||
 | 
							width: 15vw;
 | 
				
			||||||
 | 
							height: 15vw;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						.menu {
 | 
				
			||||||
 | 
							position: fixed;
 | 
				
			||||||
 | 
							top: 0;
 | 
				
			||||||
 | 
							left: 0;
 | 
				
			||||||
 | 
							width: 100%;
 | 
				
			||||||
 | 
							height: 100%;
 | 
				
			||||||
 | 
							background-color: #000a;
 | 
				
			||||||
 | 
							text-align: center;
 | 
				
			||||||
 | 
							display: table;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						.menuInterior {
 | 
				
			||||||
 | 
							display: table-cell;
 | 
				
			||||||
 | 
							vertical-align: middle;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						.menuOption {
 | 
				
			||||||
 | 
							font-size: 4vw;
 | 
				
			||||||
 | 
							background-color: #333;
 | 
				
			||||||
 | 
							border-radius: 1em;
 | 
				
			||||||
 | 
							display: inline-block;
 | 
				
			||||||
 | 
							margin-bottom: 1vw;
 | 
				
			||||||
 | 
							padding: 1vw;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						.hidden {
 | 
				
			||||||
 | 
							display: none;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						.permaHidden {
 | 
				
			||||||
 | 
							display: none;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user