diff options
| author | Jeff Carr <[email protected]> | 2019-05-29 19:57:15 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-29 19:57:15 -0700 |
| commit | a6368b7b7111758492d06f2ab9ee513dddd7197e (patch) | |
| tree | a166e525dbdf9b3c44c3f78be0b106d866d4b0ff /splash.go | |
| parent | 77035ad6bdf08097bafd4f4d4668fda4a2db9bac (diff) | |
large change to track the window everywhere
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'splash.go')
| -rw-r--r-- | splash.go | 27 |
1 files changed, 19 insertions, 8 deletions
@@ -4,22 +4,31 @@ package gui // import "time" // import "fmt" -// import "log" +import "os" +import "log" import "runtime" import "github.com/andlabs/ui" import _ "github.com/andlabs/ui/winmanifest" -func ShowSplashBox(newText *ui.AttributedString) *ui.Box { +func ShowSplashBox(wm *WindowMap, i int, newText *ui.AttributedString) *ui.Box { + log.Println("ShowSplashBox() START") + log.Println("ShowSplashBox() START wm =", wm) + if (wm == nil) { + log.Println("ShowSplashBox() WE ARE FUCKED BECAUSE WE DON'T KNOW WHAT WINDOW TO DO THIS IN") + os.Exit(0) + return nil + } newbox := ui.NewVerticalBox() newbox.SetPadded(true) // initialize the AreaHandler{} - Data.Window1.AH = new(AreaHandler) - Data.Window1.AH.Attrstr = newText - makeSplashArea(Data.Window1.AH) + Data.Windows[i].AH = new(AreaHandler) + Data.Windows[i].AH.WM = wm + Data.Windows[i].AH.Attrstr = newText + makeSplashArea(Data.Windows[i].AH) - newbox.Append(Data.Window1.AH.Area, true) + newbox.Append(Data.Windows[i].AH.Area, true) if runtime.GOOS == "linux" { newbox.Append(ui.NewLabel("OS: Linux"), false) @@ -47,9 +56,11 @@ func ShowSplashBox(newText *ui.AttributedString) *ui.Box { } } - okButton := CreateButton(nil, nil, "OK", "AREA", nil) + log.Println("ShowSplashBox() START wm =", wm) + okButton := CreateButton(wm, nil, nil, "OK", "AREA", nil) newbox.Append(okButton, false) - newbox.Append(CreateButton(nil, nil, "NEWTEXT", "NEWTEXT", nil), false) + newbox.Append(CreateButton(wm, nil, nil, "NEWTEXT", "NEWTEXT", nil), false) + // os.Exit(0) return newbox } |
