summaryrefslogtreecommitdiff
path: root/gui.go
diff options
context:
space:
mode:
Diffstat (limited to 'gui.go')
-rw-r--r--gui.go27
1 files changed, 19 insertions, 8 deletions
diff --git a/gui.go b/gui.go
index 3bdd32e..4174133 100644
--- a/gui.go
+++ b/gui.go
@@ -1,11 +1,14 @@
package gui
-import "log"
-// import "time"
-import "regexp"
+import (
+ "github.com/andlabs/ui" // import "time"
+ "log"
+ "regexp"
-import "github.com/andlabs/ui"
-import _ "github.com/andlabs/ui/winmanifest" // the _ means we only need this for the init()
+ _ "github.com/andlabs/ui/winmanifest"
+)
+
+// the _ means we only need this for the init()
const Xaxis = 0 // box that is horizontal
const Yaxis = 1 // box that is vertical
@@ -13,13 +16,21 @@ const Yaxis = 1 // box that is vertical
func init() {
log.Println("gui.init() has been run")
- Data.buttonMap = make(map[*ui.Button]*GuiButton)
- Data.WindowMap = make(map[string]*GuiWindow)
+ Data.buttonMap = make(map[*ui.Button]*GuiButton)
+ Data.WindowMap = make(map[string]*GuiWindow)
+ Data.NodeMap = make(map[string]*Node)
+
+ Data.NodeSlice = make([]*Node, 0)
+
+ Config.counter = 0
+ Config.prefix = "wit"
+ Config.DebugNode = false
+ Config.DebugTabs = false
}
func GuiInit() {
ui.OnShouldQuit(func() bool {
- ui.Quit()
+ ui.Quit()
return true
})
}