mirror of
				https://github.com/Investigamer/cardconjurer.git
				synced 2025-10-25 20:30:34 -05:00 
			
		
		
		
	toggle star/dot on collector's info
This commit is contained in:
		| @@ -357,7 +357,7 @@ include('../globalHTML/header-1.php'); | ||||
| 						</div> | ||||
| 					</div> | ||||
| 					<div id='creator-menu-bottomInfo' class='hidden'> | ||||
| 						<div class='readable-background padding'> | ||||
| 						<div class='readable-background padding margin-bottom'> | ||||
| 							<h5 class='padding margin-bottom input-description'>Enter the card number, rarity, set code, language, and artist's name</h5> | ||||
| 							<div class='padding input-grid'> | ||||
| 								<input id='info-number' type='text' class='input' oninput='bottomInfoEdited();' placeholder='Number'> | ||||
| @@ -367,6 +367,12 @@ include('../globalHTML/header-1.php'); | ||||
| 								<input id='info-artist' type='text' class='input' oninput='artistEdited(this.value);' placeholder='Artist'> | ||||
| 							</div> | ||||
| 						</div> | ||||
| 						<div class='readable-background padding'> | ||||
| 							<h5 class='input-description padding margin-bottom'>Toggle between star (seen on foils) and dot (seen on regular cards)</h5> | ||||
| 							<div class='padding'> | ||||
| 								<button class='input padding' onclick='toggleStarDot();'>Toggle Star/Dot</button> | ||||
| 							</div> | ||||
| 						</div> | ||||
| 					</div> | ||||
| 					<div id='creator-menu-import' class='hidden'> | ||||
| 						<div class='readable-background margin-bottom padding'> | ||||
| @@ -440,5 +446,5 @@ include('../globalHTML/header-1.php'); | ||||
| 			</h4> | ||||
| 		</div> | ||||
| 	</div> | ||||
| 	<script defer src='/js/creator-10.js'></script> | ||||
| 	<script defer src='/js/creator-11.js'></script> | ||||
| <?php include('../globalHTML/footer.php'); ?> | ||||
| @@ -1089,6 +1089,18 @@ function artistEdited(value) { | ||||
| 	document.querySelector('#info-artist').value = value; | ||||
| 	bottomInfoEdited(); | ||||
| } | ||||
| function toggleStarDot() { | ||||
| 	for (var key of Object.keys(card.bottomInfo)) { | ||||
| 		var text = card.bottomInfo[key].text | ||||
| 		if (text.includes('*')) { | ||||
| 			card.bottomInfo[key].text = text.replace('*', ' \u2022 '); | ||||
| 		} else { | ||||
| 			card.bottomInfo[key].text = text.replace(' \u2022 ', '*'); | ||||
| 		} | ||||
| 		// console.log(textObject[1].text)
 | ||||
| 	} | ||||
| 	bottomInfoEdited(); | ||||
| } | ||||
| //DRAWING THE CARD (putting it all together)
 | ||||
| function drawCard() { | ||||
| 	cardContext.globalCompositeOperation = 'source-over'; | ||||
		Reference in New Issue
	
	Block a user
	 Kyle
					Kyle