-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
63 lines (55 loc) · 1.36 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
package main
import (
"embed"
"log"
"github.com/wailsapp/wails/v3/pkg/application"
// "github.com/wailsapp/wails/v3/pkg/options"
// "github.com/wailsapp/wails/v3/pkg/options/assetserver"
)
//go:embed all:frontend/dist
var assets embed.FS
func main() {
// Create an instance of the app structure
app := application.New(application.Options{
Name: "rlbotgui",
Services: []application.Service{
application.NewService(&App{}),
},
Assets: application.AssetOptions{
Handler: application.AssetFileServerFS(assets),
},
})
// Create application with options
app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
Title: "RLBotGUI",
Width: 1024,
Height: 768,
MinWidth: 600,
MinHeight: 400,
// AssetServer: &assetserver.Options{
// Assets: assets,
// },
BackgroundColour: application.NewRGBA(27, 38, 54, 1),
// OnStartup: app.startup,
// Bind: []interface{}{
// app,
// &HumanInfo{},
// &PsyonixBotInfo{},
// &BotInfo{},
// *Player,
// },
})
// go func() {
// for {
// now := time.Now().Format(time.RFC1123)
// app.EmitEvent("time", now)
// time.Sleep(time.Second)
// }
// }()
// Run the application. This blocks until the application has been exited.
err := app.Run()
// If an error occurred while running the application, log it and exit.
if err != nil {
log.Fatal(err)
}
}