discordo/ui/app.go
rigormorrtiss a9ea2244f5 Revert "Move ui events handlers to corresponding file"
This reverts commit 585e5e26d93093c7b0ddf555a69c306f45ba0198.
2021-07-28 19:39:46 +04:00

14 lines
282 B
Go

package ui
import (
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
)
func NewApp(onAppInputCapture func(event *tcell.EventKey) *tcell.EventKey) (app *tview.Application) {
app = tview.NewApplication().
EnableMouse(true).
SetInputCapture(onAppInputCapture)
return
}