refactor(tracker): rename SongPoint to ScorePoint etc.

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2023-10-19 22:28:30 +03:00
parent 50ccfe03da
commit 453f45c48a
7 changed files with 63 additions and 58 deletions

View File

@ -302,7 +302,7 @@ func (te *TrackEditor) layoutTracks(gtx C, t *Tracker) D {
te.Focus()
track := int(e.Position.X) / trackColWidth
row := int((e.Position.Y-float32(gtx.Constraints.Max.Y-trackRowHeight)/2)/trackRowHeight + float32(cursorSongRow))
cursor := tracker.SongPoint{Track: track, SongRow: tracker.SongRow{Row: row}}.Clamp(t.Song().Score)
cursor := tracker.ScorePoint{Track: track, ScoreRow: tracker.ScoreRow{Row: row}}.Clamp(t.Song().Score)
t.SetCursor(cursor)
t.SetSelectionCorner(cursor)
cursorSongRow = cursor.Pattern*t.Song().Score.RowsPerPattern + cursor.Row