MINOR: minor change

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2021-10-04 19:50:29 -05:00
parent 534d631c98
commit cfc778b04f
1 changed files with 3 additions and 8 deletions

View File

@ -21,7 +21,7 @@ func StartNewWindow(bg bool, name string, axis int, callback func(*GuiBox) *GuiB
window := box.Window
log.Println("StartNewWindow() box =", box)
runWindow(window.UiWindow)
window.UiWindow.Show()
})
time.Sleep(500 * time.Millisecond) // this might make it more stable on windows?
} else {
@ -35,17 +35,11 @@ func StartNewWindow(bg bool, name string, axis int, callback func(*GuiBox) *GuiB
window := box.Window
log.Println("StartNewWindow() box =", box)
runWindow(window.UiWindow)
window.UiWindow.Show()
})
}
}
// This creates the raw andlabs/ui Window
func runWindow(uiWindow *ui.Window) {
log.Println("runWindow() START ui.Window.Show()")
uiWindow.Show()
}
func MessageWindow(gw *GuiWindow, msg1 string, msg2 string) {
ui.MsgBox(gw.UiWindow, msg1, msg2)
}
@ -81,6 +75,7 @@ func InitWindow(gw *GuiWindow, name string, axis int) *GuiBox {
newGuiWindow.UiWindow = ui.NewWindow(name, int(newGuiWindow.Width), int(newGuiWindow.Height), true)
newGuiWindow.UiWindow.SetBorderless(false)
// newGuiWindow.UiWindow.SetTitle("test")
newGuiWindow.UiWindow.OnClosing(func(*ui.Window) bool {
log.Println("initTabWindow() OnClosing() THIS WINDOW IS CLOSING newGuiWindow=", newGuiWindow)
// newGuiWindow.UiWindow.Destroy()