This repository has been archived on 2022-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
spectator/exhibit/scene.go

26 lines
365 B
Go

package exhibit
import (
"image"
)
type Scene struct {
Terminal *Terminal
Window Widget
}
func (s *Scene) Render() {
s.Window.SetSize(s.Terminal.Size())
s.Window.SetOrigin(image.Point{})
c := make([]Cell, 0)
for k, v := range s.Window.Render(image.Point{}).Cells {
v.Point = k
c = append(c, v)
}
s.Terminal.WriteCells(c)
s.Terminal.Render()
}