tui/views/eventview.go

23 lines
294 B
Go
Raw Normal View History

2021-01-10 21:52:29 +01:00
package views
import (
"tui"
"github.com/gdamore/tcell"
)
type EventView struct {
tui.ViewTmpl
KeyPressed func(key tcell.Key)
}
func (v *EventView) OnKeyPressed(key tcell.Key) {
if v.KeyPressed != nil {
v.KeyPressed(key)
}
}
func NewEventView() *EventView {
return &EventView{}
}