Added support for gauges with custom labels.

This commit is contained in:
Matteo Kloiber
2015-04-21 16:43:09 +02:00
parent 0f56f3acdd
commit 3968b02432
2 changed files with 25 additions and 11 deletions

View File

@@ -47,7 +47,15 @@ func main() {
g1.Border.FgColor = termui.ColorWhite
g1.Border.LabelFgColor = termui.ColorMagenta
termui.Render(g0, g1, g2)
g3 := termui.NewGauge()
g3.Percent = 50
g3.Width = 50
g3.Height = 3
g3.Y = 11
g3.Border.Label = "Gauge with custom label"
g3.Label = "{{percent}}% (100MBs free)"
termui.Render(g0, g1, g2, g3)
<-termui.EventCh()
}