-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
51 lines (42 loc) · 945 Bytes
/
main.go
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package main
import (
"image"
_ "image/png"
"log"
"os"
"github.com/hajimehoshi/ebiten"
"github.com/lxn/win"
)
var (
windowWidth = int(win.GetSystemMetrics(win.SM_CXSCREEN))
windowHeight = int(win.GetSystemMetrics(win.SM_CYSCREEN))
)
func window() {
file, _ := os.Open("icon.png")
icon, _, _ := image.Decode(file)
iconImage := []image.Image{icon}
ebiten.SetWindowSize(windowWidth, windowHeight)
ebiten.SetWindowTitle("Blackscreen")
ebiten.SetWindowDecorated(false)
ebiten.SetMaxTPS(0)
ebiten.SetWindowIcon(iconImage)
}
//Game :
type Game struct{}
//Update :
func (g *Game) Update() error {
return nil
}
//Draw :
func (g *Game) Draw(screen *ebiten.Image) {
}
//Layout :
func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int) {
return 1, 1
}
func main() {
window()
if err := ebiten.RunGame(&Game{}); err != nil {
log.Fatal(err)
}
}