Add Float prop

This commit is contained in:
gizak
2015-10-13 01:00:15 -04:00
parent 52f9777092
commit 86950762b0
6 changed files with 144 additions and 22 deletions

View File

@@ -26,10 +26,11 @@ func main() {
//termui.UseTheme("helloworld")
b := termui.NewBlock()
b.Width = 20
b.Height = 30
b.Height = 20
b.Float = termui.AlignCenter
b.BorderLabel = "[HELLO](fg-red,bg-white) [WORLD](fg-blue,bg-green)"
termui.SendBufferToRender(b)
termui.Render(b)
termui.Handle("/sys", func(e termui.Event) {
k, ok := e.Data.(termui.EvtKbd)
@@ -48,7 +49,7 @@ func main() {
b.BorderLabel = "[HELLO](fg-blue,bg-white) [WORLD](fg-red,bg-green)"
}
termui.SendBufferToRender(b)
termui.Render(b)
})
termui.Loop()