diff options
| author | Jeff Carr <[email protected]> | 2024-01-07 05:24:41 -0600 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-07 05:24:41 -0600 | 
| commit | c753a839fc4d1fddcae53d3fdaaf0859333b7cab (patch) | |
| tree | e7e9b1c3fa0f06b35fbb83578735af8879429146 | |
| parent | a8ba47f1d25fbc9d59ca641024e971280d0ebf0e (diff) | |
blah
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | main.go | 16 | 
1 files changed, 12 insertions, 4 deletions
@@ -14,7 +14,6 @@ func main() {  	myGui = gui.New().Default()  	helloworld() -	// hellosmart()  	// This is just a optional goroutine to watch that things are alive  	gui.Watchdog() @@ -26,18 +25,27 @@ func helloworld() {  	win.Box().NewButton("hello", func () {  		log.Println("world") +		hellosmart()  	})  }  // This creates a window  func hellosmart() { -	myGui = gui.New().Default()  	win := smartwindow.New() +	win.SetParent(myGui) +	win.InitWindow()  	win.Title("helloworld golang wit/gui window")  	win.Vertical() -	win.Draw() +	win.SetDraw(smartDraw) +	win.Make()  	win.Box().NewButton("hello", func () { -		log.Println("world") +		log.Println("smart") +	}) +} + +func smartDraw(sw *smartwindow.SmartWindow) { +	sw.Box().NewButton("hello", func () { +		log.Println("smart")  	})  }  | 
