Commit 03dcc67c authored by ceddral's avatar ceddral
Browse files

telnet_gui: add NewViewEmpty

we support 0 size screens/views anyway, no need for arbitrary
initial view sizes. just always use the Resize mechanism that
has to be present anyway
parent 4da8f0f5
......@@ -212,6 +212,10 @@ func (s *Screen) Redraw() (err error) {
return err
}
func NewViewEmpty(s *Screen) (v *View) {
return &View{0, 0, 0, 0, s}
}
func NewView(s *Screen, x, y, w, h int) (v *View) {
if x < 0 || y < 0 || s.W < x+w || s.H < y+h {
panic("View dimensions out of Screen bounds")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment