feat: add transparency

This commit is contained in:
Louis Dalibard 2024-10-20 23:45:40 +02:00
parent adfc70db3b
commit a777d6da08

View File

@ -16,8 +16,9 @@ func main() {
scale := min(config.Config.WindowWidth, config.Config.WindowHeight) / 2 scale := min(config.Config.WindowWidth, config.Config.WindowHeight) / 2
rl.InitWindow(config.Config.WindowWidth, config.Config.WindowHeight, "xyosc") rl.InitWindow(config.Config.WindowWidth, config.Config.WindowHeight, "xyosc")
defer rl.CloseWindow() defer rl.CloseWindow()
rl.SetWindowOpacity(0.0) rl.SetWindowOpacity(0.5)
rl.SetConfigFlags(rl.FlagWindowTransparent) rl.SetConfigFlags(rl.FlagWindowTransparent)
rl.SetConfigFlags(rl.FlagMsaa4xHint)
rl.SetWindowState(rl.FlagWindowUndecorated) rl.SetWindowState(rl.FlagWindowUndecorated)
rl.SetTargetFPS(config.Config.TargetFPS) rl.SetTargetFPS(config.Config.TargetFPS)
rl.SetWindowPosition(rl.GetMonitorWidth(rl.GetCurrentMonitor())/2, rl.GetMonitorHeight(rl.GetCurrentMonitor())/2) rl.SetWindowPosition(rl.GetMonitorWidth(rl.GetCurrentMonitor())/2, rl.GetMonitorHeight(rl.GetCurrentMonitor())/2)