MISC: minor cleanup

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2021-10-25 06:59:04 -05:00
parent af1daa80a0
commit a678fcd2ad
1 changed files with 5 additions and 4 deletions

View File

@ -8,17 +8,19 @@ import (
"git.wit.org/wit/gui" "git.wit.org/wit/gui"
) )
// This initializes the first window
//
// Then starts a goroutine to demonstrate how to
// inject things into the GUI
func main() { func main() {
log.Println("Starting my Control Panel") log.Println("Starting my Control Panel")
// This initializes the first window
go gui.Main(initGUI) go gui.Main(initGUI)
// This starts a goroutine to demonstrate how to
// inject things into the GUI
watchGUI() watchGUI()
} }
// This initializes the first window
func initGUI() { func initGUI() {
gui.Config.Title = "WIT GUI Window Demo" gui.Config.Title = "WIT GUI Window Demo"
gui.Config.Width = 640 gui.Config.Width = 640
@ -31,7 +33,6 @@ func initGUI() {
// This demonstrates how to properly interact with the GUI // This demonstrates how to properly interact with the GUI
// You can not involke the GUI from external goroutines in most cases. // You can not involke the GUI from external goroutines in most cases.
func watchGUI() { func watchGUI() {
var i = 1 var i = 1
for { for {