diff options
| author | Jeff Carr <[email protected]> | 2019-05-23 13:44:53 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-23 13:44:53 -0700 |
| commit | 6dadeae3fdb0e0609f8be67ef8ce07d0db12806b (patch) | |
| tree | fc589370ee08bfc5a84d99f968078bb0aa47c24e /area.go | |
| parent | f283a656dc6f57f01a3ef1f049c11830dbe4cdde (diff) | |
trap window close and correctly exit
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'area.go')
| -rw-r--r-- | area.go | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -7,10 +7,6 @@ import _ "github.com/andlabs/ui/winmanifest" import "github.com/davecgh/go-spew/spew" -func areaClick(a int, b string) { - log.Println("GOT areaClick(a,b) =", a, b) -} - func makeSplashArea(custom func(int, string)) *ui.Area { // make this button just to get the default font (but don't display the button) // There should be another way to do this (?) @@ -80,7 +76,9 @@ func (ah areaHandler) Draw(a *ui.Area, p *ui.AreaDrawParams) { func (ah areaHandler) MouseEvent(a *ui.Area, me *ui.AreaMouseEvent) { log.Println("GOT MouseEvent()") - spew.Dump(me) + if (Data.Debug) { + spew.Dump(me) + } if (me.Down == 1) { log.Println("GOT MOUSE DOWN") log.Println("GOT MOUSE DOWN") @@ -90,10 +88,10 @@ func (ah areaHandler) MouseEvent(a *ui.Area, me *ui.AreaMouseEvent) { log.Println("GOT MOUSE UP") log.Println("GOT MOUSE UP") log.Println("GOT MOUSE UP") - // splashWin.Destroy() - // ui.Quit() + if (Data.ButtonClickNew != nil) { + Data.ButtonClickNew(nil) + } } - areaClick(1, "done") } func (ah areaHandler) MouseCrossed(a *ui.Area, left bool) { |
