feat(tracker): add step parameter to advance cursor after edit

The step is currently in the song panel; might consider putting it somewhere else.

Closes #6
This commit is contained in:
vsariola
2021-02-16 09:29:02 +02:00
parent 366a05c766
commit 803184cbe7
3 changed files with 40 additions and 2 deletions

View File

@ -211,7 +211,11 @@ func (t *Tracker) KeyEvent(w *app.Window, e key.Event) bool {
if e.Modifiers.Contain(key.ModShortcut) {
t.Cursor.Row -= t.song.RowsPerPattern
} else {
t.Cursor.Row--
if t.Step.Value > 0 {
t.Cursor.Row -= t.Step.Value
} else {
t.Cursor.Row--
}
}
t.NoteTracking = false
case EditUnits:
@ -237,7 +241,11 @@ func (t *Tracker) KeyEvent(w *app.Window, e key.Event) bool {
if e.Modifiers.Contain(key.ModShortcut) {
t.Cursor.Row += t.song.RowsPerPattern
} else {
t.Cursor.Row++
if t.Step.Value > 0 {
t.Cursor.Row += t.Step.Value
} else {
t.Cursor.Row++
}
}
t.NoteTracking = false
case EditUnits: