feat(tracker, gioui): make + and - keys adjust order numbers

Holding ctrl down while adjusting the order number keeps the song effectively same, but juggles pattern numbers. Useful for reorganizing song.
This commit is contained in:
vsariola
2021-05-15 14:19:46 +03:00
parent 7885c306ee
commit 60e4518230
2 changed files with 92 additions and 0 deletions

View File

@ -124,6 +124,12 @@ func (oe *OrderEditor) doLayout(gtx C, t *Tracker) D {
cursor.Track++
}
t.SetCursor(cursor)
case "+":
t.AdjustPatternNumber(1, e.Modifiers.Contain(key.ModShortcut))
continue
case "-":
t.AdjustPatternNumber(-1, e.Modifiers.Contain(key.ModShortcut))
continue
}
if (e.Name != key.NameLeftArrow &&
e.Name != key.NameRightArrow &&