refactor(tracker): refactor IntData to IntValue, following Bool example

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-05-26 14:50:09 +03:00
parent fb3a0da3ed
commit 74f37318d6
11 changed files with 186 additions and 189 deletions

View File

@ -215,37 +215,37 @@ func (t *Tracker) KeyEvent(e key.Event, gtx C) {
t.Solo().Toggle()
// Integers
case "InstrumentVoicesAdd":
t.Model.InstrumentVoices().Int().Add(1)
t.Model.InstrumentVoices().Add(1)
case "InstrumentVoicesSubtract":
t.Model.InstrumentVoices().Int().Add(-1)
t.Model.InstrumentVoices().Add(-1)
case "TrackVoicesAdd":
t.TrackVoices().Int().Add(1)
t.TrackVoices().Add(1)
case "TrackVoicesSubtract":
t.TrackVoices().Int().Add(-1)
t.TrackVoices().Add(-1)
case "SongLengthAdd":
t.SongLength().Int().Add(1)
t.SongLength().Add(1)
case "SongLengthSubtract":
t.SongLength().Int().Add(-1)
t.SongLength().Add(-1)
case "BPMAdd":
t.BPM().Int().Add(1)
t.BPM().Add(1)
case "BPMSubtract":
t.BPM().Int().Add(-1)
t.BPM().Add(-1)
case "RowsPerPatternAdd":
t.RowsPerPattern().Int().Add(1)
t.RowsPerPattern().Add(1)
case "RowsPerPatternSubtract":
t.RowsPerPattern().Int().Add(-1)
t.RowsPerPattern().Add(-1)
case "RowsPerBeatAdd":
t.RowsPerBeat().Int().Add(1)
t.RowsPerBeat().Add(1)
case "RowsPerBeatSubtract":
t.RowsPerBeat().Int().Add(-1)
t.RowsPerBeat().Add(-1)
case "StepAdd":
t.Step().Int().Add(1)
t.Step().Add(1)
case "StepSubtract":
t.Step().Int().Add(-1)
t.Step().Add(-1)
case "OctaveAdd":
t.Octave().Int().Add(1)
t.Octave().Add(1)
case "OctaveSubtract":
t.Octave().Int().Add(-1)
t.Octave().Add(-1)
// Other miscellaneous
case "Paste":
gtx.Execute(clipboard.ReadCmd{Tag: t})