You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

29 lines
432 B

package utils
import (
"time"
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
)
const (
RefreshInterval = 250 * time.Millisecond
)
func EmptyBoxSpace(bgColor tcell.Color) *tview.Box {
box := tview.NewBox()
box.SetBackgroundColor(bgColor)
box.SetBorder(false)
return box
}
func CheckFocus(prims ...tview.Primitive) bool {
for _, prim := range prims {
if prim.HasFocus() {
return true
}
}
return false
}