Handle CJK wide characters in helper.go
Add multi width text ouput support in widgets
This commit is contained in:
gizak
2015-03-25 18:04:15 -04:00
parent 9e538ed468
commit b436024302
10 changed files with 93 additions and 27 deletions

View File

@@ -20,8 +20,8 @@ func main() {
strs := []string{
"[0] github.com/gizak/termui",
"[1] editbox.go",
"[2] iterrupt.go",
"[1] 你好,世界",
"[2] こんにちは世界",
"[3] keyboard.go",
"[4] output.go",
"[5] random_out.go",

View File

@@ -24,11 +24,11 @@ func main() {
par0.Y = 1
par0.HasBorder = false
par1 := termui.NewPar("Simple Text")
par1 := termui.NewPar("你好,世界。")
par1.Height = 3
par1.Width = 17
par1.X = 20
par1.Border.Label = "Label"
par1.Border.Label = "标签"
par2 := termui.NewPar("Simple text\nwith label. It can be multilined with \\n or break automatically")
par2.Height = 5