Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added cross button in color gradient platte #90

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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