main.go 500 B

123456789101112131415161718192021222324252627
  1. package main
  2. import (
  3. "embed"
  4. "github.com/tobychui/naffg"
  5. )
  6. //go:embed res/*
  7. var uiFiles embed.FS
  8. func main() {
  9. app := naffg.NewApplication(&naffg.Options{
  10. Title: "CSS Demo",
  11. Width: 400,
  12. Height: 300,
  13. Resizable: false,
  14. UiRes: &uiFiles, //Embed the UI resources
  15. UiResPreix: "res", //The folder where the resources is embeded from
  16. })
  17. //Print the embedded files
  18. app.Debug_PrintEmbeddedFiles()
  19. // Run the application
  20. app.Run()
  21. }