feat(tracker): add simple BPM & octave buttons

This commit is contained in:
vsariola
2021-01-07 19:25:16 +02:00
parent 1d524b5815
commit 82d26b79a4
3 changed files with 101 additions and 14 deletions

View File

@ -70,16 +70,9 @@ func (t *Tracker) KeyEvent(e key.Event) bool {
return true
case `\`:
if e.Modifiers.Contain(key.ModShift) {
if t.CurrentOctave < 9 {
t.CurrentOctave++
return true
}
} else {
if t.CurrentOctave > 0 {
t.CurrentOctave--
return true
}
return t.ChangeBPM(1)
}
return t.ChangeBPM(-1)
case key.NameUpArrow:
delta := -1
if e.Modifiers.Contain(key.ModCtrl) {