Merge pull request #61 from adamar/master

Added basic window example. Thanks @adamar.
This commit is contained in:
Pietro Gagliardi 2014-11-26 22:05:36 -05:00
commit 07b68e6236
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
package main
import (
"github.com/andlabs/ui"
"log"
)
func main() {
go ui.Do(gui)
err := ui.Go()
if err != nil {
log.Print(err)
}
}
func gui() {
// Here we create a new space
newControl := ui.Space()
// Then we create a window
w := ui.NewWindow("Window", 280, 350, newControl)
w.OnClosing(func() bool {
ui.Stop()
return true
})
w.Show()
}