examples/mascot: use RunGameWithOptions

Updates #2378
This commit is contained in:
Hajime Hoshi 2022-12-13 01:05:53 +09:00
parent 6ed5293132
commit 8e5ae88738

View File

@ -139,11 +139,13 @@ func (m *mascot) Draw(screen *ebiten.Image) {
}
func main() {
ebiten.SetScreenTransparent(true)
ebiten.SetWindowDecorated(false)
ebiten.SetWindowFloating(true)
ebiten.SetWindowSize(width, height)
if err := ebiten.RunGame(&mascot{}); err != nil {
op := &ebiten.RunGameOptions{}
op.ScreenTransparent = true
if err := ebiten.RunGameWithOptions(&mascot{}, op); err != nil {
log.Fatal(err)
}
}