summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-07 13:30:17 -0600
committerJeff Carr <[email protected]>2024-11-07 13:30:17 -0600
commit161f3934ceab7943445389daf199ad3901c091e8 (patch)
treeffa77b7304ed745589506f6cb1d4d6baf0f331c4 /main.go
parentbc01313a04ddb0cfe5eae72a0e04995765a53c84 (diff)
update to also embed toolkit plugins in the binaryv0.21.1
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.go b/main.go
index 2204571..df6c40f 100644
--- a/main.go
+++ b/main.go
@@ -1,7 +1,8 @@
-// This creates a simple hello world window
package main
import (
+ "embed"
+
"go.wit.com/gui"
"go.wit.com/lib/debugger"
"go.wit.com/lib/gadgets"
@@ -9,9 +10,15 @@ import (
"go.wit.com/log"
)
+// sent via -ldflags
+var VERSION string
+
// This is the beginning of the binary tree of widgets
var myGui *gui.Node
+//go:embed resources/*
+var resources embed.FS
+
// this is the primary window. If you close it, the program will exit
var mainWindow *gui.Node
@@ -28,6 +35,7 @@ func main() {
log.ShowFlags()
}
myGui = gui.New()
+ myGui.InitEmbed(resources)
myGui.Default()
helloworld()