drum-machine fix tooltips for menuselectionitems

This commit is contained in:
Trent Palmer 2020-05-27 14:52:32 -07:00
parent bfd37c7d81
commit 53ecad662b
3 changed files with 9 additions and 3 deletions

View File

@ -10,7 +10,6 @@
### TODOS
* fix toolstips for menuselectionitems
* add focus() to selectionMenuItems so that you can immediately begin scrolling with arrow keys
* add tip for scrolling selectionMenuItems
* make sure metronome continues on volume, sound, or metronome BPM change

View File

@ -170,6 +170,7 @@ body {
text-align: center;
font-style: bold;
font-size: 1.6rem;
direction: ltr;
}
.selectionMenuItem:active, .volumeSelectionMenuItem:active, .metronomeSelectionMenuItem:active {

View File

@ -97,9 +97,13 @@ const showMetronomeSelectionMenuItems = (menuItems) => {
const makeMetronomeSelectionMenuItemToolTipContent = (text) => {
if (padsArray.includes(text)) {
return sessionStorage.getItem(text + 'isMetronome') === "false" ? 'Metronome Off' : sessionStorage.getItem(text + 'metronomeTempo');
return 'set metronome tempo for ' + text + ' (or disable)';
} else if (text === 'Metronome Off') {
return 'turn metronome off for ' + padSelectingFor;
} else if (text === '( cancel -- back )') {
return text;
} else {
return 'set metronome temp for ' + padSelectingFor + ': ' + text.split(':')[1];
}
}
@ -165,9 +169,11 @@ const showVolumeSelectionMenuItems = (menuItems) => {
const makeVolumeSelectionMenuItemToolTipContent = (text) => {
if (padsArray.includes(text)) {
return 'volume offset for ' + text;
return 'set volume offset for ' + text;
} else if (text === '( cancel -- back )') {
return text;
} else {
return 'set volume offset for ' + padSelectingFor + ': '+ text;
}
}