From b213a90e20acde86a942d3effc160593f6296cb8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 29 May 2019 22:24:22 -0700 Subject: [PATCH] small cleanups Signed-off-by: Jeff Carr --- main.go | 5 ++--- test4/main.go | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index 67117ba..54f6410 100644 --- a/main.go +++ b/main.go @@ -144,8 +144,7 @@ func main() { // make this the main loop in an attempt to figure out the crashes // do not change this until the GUI is stable - gui.InitNewWindow(config, "SPLASH") - gui.ShowWindow() + gui.StartNewWindow(config, false, "SPLASH") // gui.Data.Window1 = new(gui.WindowMap) // gui.Data.Window1.AreaText = getSplashText() @@ -345,7 +344,7 @@ func mainMouseClick(b *gui.ButtonMap) { } } } else if (b.Action == "SHOW VM") { - gui.Data.CurrentVM = b.VM + // gui.Data.CurrentVM = b.VM if (gui.Data.Debug) { log.Println("\tATTEMPTING TO SHOW VM IN WINDOW") // go gui.GoShowVM() diff --git a/test4/main.go b/test4/main.go index fc9dca5..7a29bba 100644 --- a/test4/main.go +++ b/test4/main.go @@ -12,13 +12,28 @@ import "github.com/andlabs/ui" import _ "github.com/andlabs/ui/winmanifest" func main() { - c := pb.MakeDefaultConfig() + var c *pb.Config + c = pb.MakeDefaultConfig() gui.Data.MouseClick = mainMouseClick + i := 0 + + gui.Data.Hostname = "splash " + string(i) + gui.StartNewWindow(c, true, "SPLASH") + + i += 1 + gui.Data.Hostname = "splash " + string(i) + gui.StartNewWindow(c, true, "BLAH") + for { - gui.StartNewWindow(c, "SPLASH") - gui.StartNewWindow(c, "BLAH") + i += 1 + gui.Data.Hostname = "splash " + string(i) + gui.StartNewWindow(c, false, "SPLASH") + + i += 1 + gui.Data.Hostname = "splash " + string(i) + gui.StartNewWindow(c, false, "BLAH") } }