Implemented RendererFactory in Par.

This commit is contained in:
Matteo Kloiber
2015-04-16 20:19:44 +02:00
parent a3f1384a3b
commit e9e3e4084e
3 changed files with 30 additions and 31 deletions

View File

@@ -29,7 +29,8 @@ func main() {
par1.X = 20
par1.Border.Label = "标签"
par2 := termui.NewPar("Simple text\nwith label. It can be multilined with \\n or break automatically")
par2 := termui.NewPar("Simple colored text\nwith label. It [can be](RED) multilined with \\n or [break automatically](GREEN, BOLD)")
par2.RendererFactory = termui.MarkdownTextRendererFactory{}
par2.Height = 5
par2.Width = 37
par2.Y = 4

View File

@@ -123,7 +123,7 @@ func main() {
ui.Render(p, list, g, sp, lc, bc, lc1, p1)
}
evt := EventCh()
evt := ui.EventCh()
i := 0
for {
select {