feat(tracker): add numeric updown to adjust RowsPerPattern

This commit is contained in:
vsariola
2021-01-30 23:22:31 +02:00
parent f3b21cc75f
commit 98c8d18a3e
4 changed files with 53 additions and 5 deletions

View File

@ -40,7 +40,8 @@ func (t *Tracker) layoutTrack(trackNo int) layout.Widget {
if patternRect.Contains(SongPoint{Track: trackNo, SongRow: SongRow{Pattern: i}}) {
paint.FillShape(gtx.Ops, activeTrackColor, clip.Rect{Max: image.Pt(trackWidth, trackRowHeight*t.song.RowsPerPattern)}.Op())
}
for j, c := range t.song.Tracks[trackNo].Patterns[s] {
for j := 0; j < t.song.RowsPerPattern; j++ {
c := t.song.Tracks[trackNo].Patterns[s][j]
songRow := SongRow{Pattern: i, Row: j}
songPoint := SongPoint{Track: trackNo, SongRow: songRow}
if songRow == t.PlayPosition && t.Playing {