package tui import ( "git.tordarus.net/tordarus/buf2d" "github.com/gdamore/tcell" ) type ViewTmpl struct { view View foreground tcell.Color background tcell.Color } var _ View = &ViewTmpl{} func NewViewTmpl(v View) *ViewTmpl { return &ViewTmpl{ view: v, } } func (v *ViewTmpl) Draw(buf *buf2d.Buffer) { buf.Fill(' ') } func (v *ViewTmpl) OnKeyPressed(key tcell.Key) { } func (v *ViewTmpl) Foreground() tcell.Color { return v.foreground } func (v *ViewTmpl) SetForeground(color tcell.Color) { v.foreground = color } func (v *ViewTmpl) Background() tcell.Color { return v.background } func (v *ViewTmpl) SetBackground(color tcell.Color) { v.background = color }