More work
This commit is contained in:
@@ -40,6 +40,8 @@ type TreeBrowser struct {
|
||||
searching bool
|
||||
searchStr string
|
||||
|
||||
hintText string
|
||||
|
||||
logger func(string, ...any)
|
||||
|
||||
m sync.Mutex
|
||||
@@ -160,6 +162,13 @@ func (w *TreeBrowser) Draw(screen tcell.Screen) {
|
||||
th.BorderFilled(x, y, x+w.w, y+w.h, w.border, dS, screen)
|
||||
}
|
||||
}
|
||||
if w.hintText != "" {
|
||||
if brdSz == 0 {
|
||||
brdSz = 1
|
||||
}
|
||||
|
||||
wh.DrawText(x+1, y+w.h, w.hintText, dS, screen)
|
||||
}
|
||||
x, y = x+1, y+1
|
||||
h := w.h - brdSz
|
||||
ln := len(w.list)
|
||||
@@ -487,6 +496,9 @@ func (w *TreeBrowser) getCurrentLine() string {
|
||||
return w.list[w.cursor]
|
||||
}
|
||||
|
||||
func (w *TreeBrowser) SetHintText(txt string) { w.hintText = txt }
|
||||
func (w *TreeBrowser) ClearHintText(txt string) { w.hintText = "" }
|
||||
|
||||
/*
|
||||
* Tree Node
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user