Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
tadaborisu authored Dec 9, 2020
1 parent 75f44b3 commit d00e1ad
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,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)
}
}

0 comments on commit d00e1ad

Please sign in to comment.