summaryrefslogtreecommitdiff
path: root/gocui/color.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-08 20:52:10 -0600
committerJeff Carr <[email protected]>2024-01-08 20:52:10 -0600
commit3c2da3f096a5e8aeaa657deb2dc047cc23118c99 (patch)
tree9be876900a02aebed4540f5453759ea1f1d5c7ce /gocui/color.go
parent2a9724d7a89733db8c41571a8b5d9d0e1f0d76b3 (diff)
use "go.wit.com/log"
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gocui/color.go')
-rw-r--r--gocui/color.go12
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()