feat(tracker): make instrument name editable

This commit is contained in:
vsariola
2021-02-06 23:39:58 +02:00
parent 6c0cf6832e
commit 5588d7ca7d
4 changed files with 60 additions and 9 deletions

View File

@ -45,6 +45,9 @@ var noteMap = map[string]int{
// KeyEvent handles incoming key events and returns true if repaint is needed.
func (t *Tracker) KeyEvent(e key.Event) bool {
if e.State == key.Press {
if t.InstrumentNameEditor.Focused() {
return false
}
switch e.Name {
case "Z":
if e.Modifiers.Contain(key.ModCtrl) {