-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
79 lines (65 loc) · 1.93 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package main
import (
"embed"
"fmt"
log "github.com/AlbinoGeek/logxi/v1"
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
"github.com/wailsapp/wails/v2/pkg/options/linux"
"github.com/wailsapp/wails/v2/pkg/options/mac"
"github.com/wailsapp/wails/v2/pkg/options/windows"
"lethalmodding.com/concrete/src/app/gui"
"lethalmodding.com/concrete/src/app/launcher"
)
//go:embed all:frontend/dist/*
var assets embed.FS
func main() {
app := gui.NewApp()
err := wails.Run(&options.App{
AssetServer: &assetserver.Options{Assets: assets},
Bind: []interface{}{
app,
app.Steam,
launcher.NewLauncher(),
},
Logger: app.StdLogger(),
LogLevel: log.LevelDebug,
LogLevelProduction: log.LevelWarn,
OnStartup: app.OnStartup,
OnDomReady: app.OnDomReady,
OnBeforeClose: app.OnBeforeClose,
OnShutdown: app.OnShutdown,
SingleInstanceLock: &options.SingleInstanceLock{
UniqueId: "21bef4ab-312a-4316-974c-3ff50e9a8172",
OnSecondInstanceLaunch: app.OnSecondInstanceLaunch,
},
Title: "Concrete - LethalModding.com",
BackgroundColour: &options.RGBA{R: 25, G: 25, B: 30, A: 200},
Frameless: false,
Height: 720,
Width: 1280,
MinHeight: 1080 / 2.5,
MinWidth: 1920 / 2.5,
Linux: &linux.Options{
ProgramName: "Concrete - LethalModding.com",
WebviewGpuPolicy: linux.WebviewGpuPolicyOnDemand,
WindowIsTranslucent: true,
},
Mac: &mac.Options{
Appearance: mac.NSAppearanceNameDarkAqua,
TitleBar: mac.TitleBarHiddenInset(),
WindowIsTranslucent: true,
WebviewIsTransparent: true,
},
Windows: &windows.Options{
BackdropType: windows.Acrylic,
Theme: windows.Dark,
WindowIsTranslucent: true,
WebviewIsTransparent: true,
},
})
if err != nil {
fmt.Println(err)
}
}