Increase dialogue modality, display keyboard dialogue

This commit is contained in:
2020-04-14 12:12:37 +01:00
parent 786d261f98
commit 82d3849402
7 changed files with 136 additions and 50 deletions

25
internal/flow/keyboard.go Normal file
View File

@@ -0,0 +1,25 @@
package flow
import (
"fmt"
"log"
)
func (f *Flow) linkKeyboard() {
// Keyboard settings
// TODO: implement keybindings save/load behaviour
f.onClick(kbd, "3.1", f.returnToLastDriver(kbd)) // Done button
f.onClick(kbd, "3.2", f.returnToLastDriver(kbd)) // Cancel button
f.onClick(kbd, "3.4", func() {}) // TODO: Reset to defaults button
for i := 1; i <= 13; i++ {
f.onClick(kbd, fmt.Sprintf("2.%v", i), f.captureKeybinding(i))
}
}
func (f *Flow) captureKeybinding(forLine int) func() {
return func() {
log.Printf("HELLO %v", forLine)
f.showDialogue(kbd, "4")()
}
}