Skip to content

Commit

Permalink
Merge pull request #90 from DevanshPaliwal/main
Browse files Browse the repository at this point in the history
Added cross button in color gradient platte
  • Loading branch information
Durgesh4993 authored Jul 2, 2024
2 parents 79c838e + 4b5261b commit abe1d41
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -3915,6 +3915,10 @@ function applyGradient() {
toggleGradientSelector(); // Close the selector container after applying the gradient
}

function exitGradient(){
toggleGradientSelector()
}

// Function to display instructions

document.querySelector('.instructions').addEventListener('click', () => {
Expand Down
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@
<button class="gradient-button" onclick="toggleGradientSelector()">🎨</button>
</div>
<div class="gradient-selector-container" id="gradientSelectorContainer">
<div>
<button onclick="exitGradient()" style="background-color: transparent; border: none; height: 10%; width: 12%; position: absolute; top:1%; right: 7%; color: white; font-size: 40px; text-align: center;">
x
</button>
</div>

<label for="color1" class="color">Color 1:</label>
<input type="color" id="color1" name="color1" value="#FFEA7E" class="color_input">
<label for="color2" class="color">Color 2:</label>
Expand Down

0 comments on commit abe1d41

Please sign in to comment.