aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/gizak/termui/example/list.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-24 23:40:18 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-24 23:40:18 +0800
commit1ce40d7581bac2b776d1e47ec49c03c0fcc7fdc1 (patch)
treef7b957645b11bc19ecf7fb29baaa13530557af7a /Godeps/_workspace/src/github.com/gizak/termui/example/list.go
parent92ef33d97a437dce2d7b55f06342de388d95f575 (diff)
downloadgo-tangerine-1ce40d7581bac2b776d1e47ec49c03c0fcc7fdc1.tar.gz
go-tangerine-1ce40d7581bac2b776d1e47ec49c03c0fcc7fdc1.tar.zst
go-tangerine-1ce40d7581bac2b776d1e47ec49c03c0fcc7fdc1.zip
Godeps: remove mist remnants, add termui deps
Diffstat (limited to 'Godeps/_workspace/src/github.com/gizak/termui/example/list.go')
-rw-r--r--Godeps/_workspace/src/github.com/gizak/termui/example/list.go41
1 files changed, 41 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/gizak/termui/example/list.go b/Godeps/_workspace/src/github.com/gizak/termui/example/list.go
new file mode 100644
index 000000000..d33a3616c
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/gizak/termui/example/list.go
@@ -0,0 +1,41 @@
+// Copyright 2015 Zack Guo <gizak@icloud.com>. All rights reserved.
+// Use of this source code is governed by a MIT license that can
+// be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import "github.com/gizak/termui"
+
+func main() {
+ err := termui.Init()
+ if err != nil {
+ panic(err)
+ }
+ defer termui.Close()
+
+ termui.UseTheme("helloworld")
+
+ strs := []string{
+ "[0] github.com/gizak/termui",
+ "[1] 你好,世界",
+ "[2] こんにちは世界",
+ "[3] keyboard.go",
+ "[4] output.go",
+ "[5] random_out.go",
+ "[6] dashboard.go",
+ "[7] nsf/termbox-go"}
+
+ ls := termui.NewList()
+ ls.Items = strs
+ ls.ItemFgColor = termui.ColorYellow
+ ls.Border.Label = "List"
+ ls.Height = 7
+ ls.Width = 25
+ ls.Y = 0
+
+ termui.Render(ls)
+
+ <-termui.EventCh()
+}