diff options
Diffstat (limited to 'gocui/color.go')
| -rw-r--r-- | gocui/color.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gocui/color.go b/gocui/color.go index c665bb6..ca4301f 100644 --- a/gocui/color.go +++ b/gocui/color.go @@ -3,6 +3,8 @@ package main import ( "math/rand" "github.com/awesome-gocui/gocui" + + "go.wit.com/log" ) //w.v.SelBgColor = gocui.ColorCyan @@ -73,10 +75,10 @@ func (n *node) setColor(newColor *colorT) { return } if (tk.color == nil) { - log(true, "Set the node to color = nil") + log.Log(NOW, "Set the node to color = nil") tk.color = &colorNone } - log(true, "Set the node to color =", tk.color.name) + log.Log(NOW, "Set the node to color =", tk.color.name) n.recreateView() } @@ -87,7 +89,7 @@ func (n *node) setDefaultWidgetColor() { func (n *node) setDefaultHighlight() { w := n.tk if (w.v == nil) { - log(logError, "SetColor() failed on view == nil") + log.Log(ERROR, "SetColor() failed on view == nil") return } w.v.SelBgColor = gocui.ColorGreen @@ -97,7 +99,7 @@ func (n *node) setDefaultHighlight() { func randColor() gocui.Attribute { colors := []string{"Green", "#FFAA55", "Yellow", "Blue", "Red", "Black", "White"} i := rand.Intn(len(colors)) - log(true, "randColor() i =", i) + log.Log(NOW, "randColor() i =", i) return gocui.GetColor(colors[i]) } @@ -107,7 +109,7 @@ func (n *node) redoColor(draw bool) { return } - sleep(.05) + log.Sleep(.05) n.setDefaultHighlight() n.setDefaultWidgetColor() |
