Skip to content

Commit

Permalink
improved lightshow
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Aug 15, 2024
1 parent 818503d commit 426b72d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/assets/js/initLightshow.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ document.addEventListener('DOMContentLoaded', function() {

const cycleButton = document.getElementById('cycle-button');
const selectButton = document.getElementById('select-button');
const menusButton = document.getElementById('menus-button');

// Handle Cycle button click
cycleButton.addEventListener('click', function() {
lightshow.vortex.shortClick(0); // Example: cycle through modes
lightshow.vortex.shortClick(0);
});

// Handle Select button click
selectButton.addEventListener('click', function() {
lightshow.vortex.longClick(0); // Example: select the current mode or pattern
lightshow.vortex.longClick(0);
});

// open the menus
menusButton.addEventListener('click', function() {
lightshow.vortex.engine().menus().openMenuSelection();
});
});
});
1 change: 1 addition & 0 deletions docs/led_selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ The led selection is always the first step after entering one of these menus.
<div id="controls">
<button id="cycle-button" class="lightshow-button">Cycle</button>
<button id="select-button" class="lightshow-button">Select</button>
<button id="menus-button" class="lightshow-button">Menus</button>
</div>

0 comments on commit 426b72d

Please sign in to comment.