Skip to content

Commit

Permalink
colorselect interactive preview update
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Aug 16, 2024
1 parent 32ff051 commit 454cec0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
2 changes: 2 additions & 0 deletions docs/assets/js/ColorSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function moveAddButton(slot) {
prevAddSlot.classList.remove('add-slot');
prevAddSlot.classList.add('empty');
prevAddSlot.innerHTML = '';
prevAddSlot.onclick = null; // Remove the click handler for empty slots
}

// Make the current slot the new add slot
Expand Down Expand Up @@ -169,6 +170,7 @@ function deleteSlot(slot) {
prevAddSlot.classList.remove('add-slot');
prevAddSlot.classList.add('empty');
prevAddSlot.innerHTML = '';
prevAddSlot.onclick = null; // Disable click on the now-empty slot
}

// Turn the deleted slot into the new add slot
Expand Down
36 changes: 14 additions & 22 deletions docs/color_select_menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@ grand_parent: Vortex Engine
---

<style>
.empty {
background-color: #222; /* Different background color for empty slots */
border: 2px dashed #555; /* Dashed border to distinguish empty slots */
}

.add-slot {
background-color: #fff;
color: #000;
font-weight: bold;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}

.slot {
width: 50px;
height: 50px;
Expand All @@ -33,20 +17,28 @@ grand_parent: Vortex Engine
cursor: pointer;
position: relative;
display: inline-block;
margin-top: 50px;
text-align: center;
}

@keyframes flashRed {
0% { background-color: inherit; }
50% { background-color: red; }
100% { background-color: inherit; }
.empty {
background-color: #222;
border: 2px dashed #555;
cursor: default; /* No pointer cursor for empty slots */
}

.add-slot {
background-color: #444;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}

.plus-icon {
font-size: 24px;
color: #777;
color: #fff;
font-weight: bold;
line-height: 1;
}

.save-slot {
Expand Down

0 comments on commit 454cec0

Please sign in to comment.