Checkpoint
This commit is contained in:
160 files changed
+76293
-387
No files matched your search
@@ -0,0 +1,32 @@
|
||||
package widget
|
||||
|
||||
import (
|
||||
"image"
|
||||
"image/draw"
|
||||
|
||||
"github.com/BeatGlow/beatglow/ui"
|
||||
"github.com/BeatGlow/display"
|
||||
)
|
||||
|
||||
type base struct {
|
||||
display display.Display
|
||||
style ui.Style
|
||||
position image.Point
|
||||
buffer draw.Image
|
||||
changed bool
|
||||
}
|
||||
|
||||
func makeBase(display display.Display, at image.Point, width, height int) base {
|
||||
m := display.ColorModel()
|
||||
return base{
|
||||
display: display,
|
||||
style: ui.StylesFor(m).Default,
|
||||
position: at,
|
||||
buffer: ui.BufferFor(m, width, height),
|
||||
}
|
||||
}
|
||||
|
||||
func (w *base) SetStyle(style ui.Style) {
|
||||
w.style = style
|
||||
w.changed = true
|
||||
}
|
||||
Reference in new issue
Block a user