diff options
| author | Jeff Carr <[email protected]> | 2022-10-16 08:07:13 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-10-16 08:07:13 -0500 |
| commit | 2141e04328dcf4e4d6857fcc0a7cb551fc84fa07 (patch) | |
| tree | f8b2a5d8cf17f9ccfcfa8c1699fe4a52ea8338e2 /cmds/helloworld | |
| parent | 3c899365154e48aefbc0b5ee48cd089f49339cb2 (diff) | |
Add slander and spinbox in toolkit/andlabs
fix the helloworld demo
move slider into toolkit/
move more into the toolkit directory
add spinbox()
fix example
minor update
fix examples
Fix andlabs.ui.Slider() to work again
correctly implement custom OnChange() callback
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'cmds/helloworld')
| -rw-r--r-- | cmds/helloworld/Makefile | 14 | ||||
| -rwxr-xr-x | cmds/helloworld/helloworld | bin | 3097960 -> 0 bytes | |||
| -rw-r--r-- | cmds/helloworld/main.go | 10 |
3 files changed, 24 insertions, 0 deletions
diff --git a/cmds/helloworld/Makefile b/cmds/helloworld/Makefile new file mode 100644 index 0000000..f18abaf --- /dev/null +++ b/cmds/helloworld/Makefile @@ -0,0 +1,14 @@ +run: build + ./helloworld + +build: + go get -v -u -x . + go build + +build-master: + GO111MODULE="off" go get -v -x . + GO111MODULE="off" go build + ./helloworld + +update: + GO111MODULE="off" go get -v -u -x . diff --git a/cmds/helloworld/helloworld b/cmds/helloworld/helloworld Binary files differdeleted file mode 100755 index cc41f78..0000000 --- a/cmds/helloworld/helloworld +++ /dev/null diff --git a/cmds/helloworld/main.go b/cmds/helloworld/main.go index 1cb1bbd..6e52a0b 100644 --- a/cmds/helloworld/main.go +++ b/cmds/helloworld/main.go @@ -2,6 +2,8 @@ package main import ( + "os" + "log" "git.wit.org/wit/gui" ) @@ -14,6 +16,8 @@ func initGUI() { gui.Config.Title = "Hello World golang wit/gui Window" gui.Config.Width = 640 gui.Config.Height = 480 + gui.Config.Exit = myDefaultExit + node1 := gui.NewWindow() addDemoTab(node1, "A Simple Tab Demo") addDemoTab(node1, "A Second Tab") @@ -25,3 +29,9 @@ func addDemoTab(n *gui.Node, title string) { groupNode1 := newNode.AddGroup("group 1") groupNode1.AddComboBox("demoCombo2", "more 1", "more 2", "more 3") } + +func myDefaultExit(n *gui.Node) { + log.Println("You can Do exit() things here") + os.Exit(0) +} + |
