diff options
| author | Jeff Carr <[email protected]> | 2019-05-22 20:30:48 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-22 20:30:48 -0700 |
| commit | 6984b0dbc06e2972f7847974fca1b8d8b59e60de (patch) | |
| tree | 3fd80a8b917facceadc623d6c15629a85d9a5236 /splash.go | |
| parent | 23f110b5a271ea6b300536cc5189635f42c40b96 (diff) | |
all local variables are in Data{}
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'splash.go')
| -rw-r--r-- | splash.go | 31 |
1 files changed, 2 insertions, 29 deletions
@@ -10,41 +10,14 @@ import "runtime" import "github.com/andlabs/ui" import _ "github.com/andlabs/ui/winmanifest" -var MyArea *ui.Area - -func ShowSplash() *ui.Window { - splashWin := ui.NewWindow("", 640, 480, true) - splashWin.SetBorderless(true) - splashWin.OnClosing(func(*ui.Window) bool { - ui.Quit() - return true - }) - ui.OnShouldQuit(func() bool { - splashWin.Destroy() - return true - }) - - vbox := ui.NewVerticalBox() - vbox.SetPadded(true) - splashWin.SetChild(vbox) - splashWin.SetMargined(true) - - // This displays the window - // splashWin.Show() - - ShowSplashBox(vbox, nil, nil) - - return splashWin -} - func ShowSplashBox(vbox *ui.Box, atest chan int, custom func(int, string)) *ui.Box { newbox := ui.NewVerticalBox() newbox.SetPadded(true) makeAttributedString() - MyArea = makeSplashArea(custom) + Data.MyArea = makeSplashArea(custom) - newbox.Append(MyArea, true) + newbox.Append(Data.MyArea, true) if runtime.GOOS == "linux" { newbox.Append(ui.NewLabel("OS: Linux"), false) |
