mirror of
https://github.com/vsariola/sointu.git
synced 2026-02-14 04:03:23 -05:00
feat(tracker): enum-style values and menus to choose one option
This commit is contained in:
parent
ca4b87d43d
commit
4bb5df9c87
@ -182,6 +182,12 @@ func (v *playSyntherIndex) SetValue(value int) bool {
|
||||
TrySend(v.broker.ToPlayer, any(v.synthers[value]))
|
||||
return true
|
||||
}
|
||||
func (v *playSyntherIndex) StringOf(value int) string {
|
||||
if value < 0 || value >= len(v.synthers) {
|
||||
return ""
|
||||
}
|
||||
return v.synthers[value].Name()
|
||||
}
|
||||
|
||||
// SyntherName returns the name of the currently selected synther.
|
||||
func (v *Play) SyntherName() string { return v.synthers[v.syntherIndex].Name() }
|
||||
|
||||
Reference in New Issue
Block a user