mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 13:04:25 -04:00
refactor(sointu): move parameter string conversion to song level
Some parameter values need the whole song or at least the unit to give accurate hint what the parameter means. For example: send needs to know the entire song to know what the target unit refers to.
This commit is contained in:
@ -52,8 +52,9 @@ func (t *Tracker) layoutUnitSliders(gtx C) D {
|
||||
sliderStyle.Color = t.Theme.Fg
|
||||
var valueText string
|
||||
value := params[ut[index].Name]
|
||||
if ut[index].ToString != nil {
|
||||
valueText = fmt.Sprintf("%v / %v", value, ut[index].ToString(value))
|
||||
hint := t.song.ParamHintString(t.CurrentInstrument, t.CurrentUnit, ut[index].Name)
|
||||
if hint != "" {
|
||||
valueText = fmt.Sprintf("%v / %v", value, hint)
|
||||
} else {
|
||||
valueText = fmt.Sprintf("%v", value)
|
||||
}
|
||||
|
Reference in New Issue
Block a user