summaryrefslogtreecommitdiff
path: root/cmds/helloworld
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/helloworld')
-rw-r--r--cmds/helloworld/Makefile14
-rwxr-xr-xcmds/helloworld/helloworldbin3097960 -> 0 bytes
-rw-r--r--cmds/helloworld/main.go10
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
deleted file mode 100755
index cc41f78..0000000
--- a/cmds/helloworld/helloworld
+++ /dev/null
Binary files differ
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)
+}
+