2021-08-05 15:14:56 +10:00
|
|
|
package engine
|
|
|
|
|
|
|
|
import (
|
|
|
|
"image/color"
|
|
|
|
|
|
|
|
"github.com/hajimehoshi/ebiten/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Fill fills the screen with a colour.
|
|
|
|
type Fill struct {
|
|
|
|
Color color.Color
|
|
|
|
Hidden bool
|
|
|
|
ID
|
|
|
|
ZPos
|
|
|
|
}
|
|
|
|
|
2021-08-12 14:06:01 +10:00
|
|
|
func (f *Fill) Draw(screen *ebiten.Image, opts ebiten.DrawImageOptions) {
|
2021-08-05 15:14:56 +10:00
|
|
|
if f.Hidden {
|
|
|
|
return
|
|
|
|
}
|
2021-08-12 14:06:01 +10:00
|
|
|
screen.Fill(opts.ColorM.Apply(f.Color))
|
2021-08-05 15:14:56 +10:00
|
|
|
}
|