ColouringApp/main.go

41 lines
818 B
Go
Raw Normal View History

2024-01-08 13:29:40 +00:00
package main
import (
"ColouringApp/application"
"ColouringApp/scenes"
2024-01-15 12:19:49 +00:00
2024-01-08 13:29:40 +00:00
raylib "github.com/gen2brain/raylib-go/raylib"
)
func main() {
2024-01-23 17:23:57 +00:00
raylib.SetConfigFlags(raylib.FlagWindowResizable)
2024-01-15 12:19:49 +00:00
2024-01-08 13:29:40 +00:00
raylib.InitWindow(application.WindowWidth, application.WindowHeight, application.WindowTitle)
raylib.InitAudioDevice()
2024-01-23 17:23:57 +00:00
//raylib.SetTargetFPS(application.WindowFPS)
2024-01-23 16:50:36 +00:00
//raylib.SetExitKey(0) // disable exit key
2024-01-08 13:29:40 +00:00
// MAIN LOOP
for !application.ShouldQuit {
switch application.CurrentScene {
2024-01-11 00:17:29 +00:00
case application.ScenePlayerData:
scenes.PlayerData()
2024-01-08 13:29:40 +00:00
case application.SceneTitle:
scenes.Title()
case application.SceneOptions:
scenes.Options()
2024-01-23 16:50:36 +00:00
case application.SceneDrawing:
scenes.Drawing()
2024-01-08 13:29:40 +00:00
default:
panic("Unknown scene")
}
}
// QUIT
raylib.CloseAudioDevice()
raylib.CloseWindow()
// GOODBYE
}