blob: 3c6f0a5201c5272aacd6b5b1e8f47c248ecf5911 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package ui
import (
tb "github.com/nsf/termbox-go"
)
type Fill rune
func NewFill(f rune) Fill {
return Fill(f)
}
func (f Fill) Draw(ctx *Context) {
for x := 0; x < ctx.Width(); x += 1 {
for y := 0; y < ctx.Height(); y += 1 {
ctx.SetCell(x, y, rune(f), tb.ColorDefault, tb.ColorDefault)
}
}
}
func (f Fill) OnInvalidate(callback func(d Drawable)) {
// no-op
}
func (f Fill) Invalidate() {
// no-op
}
|