DrawOffset
This commit is contained in:
@@ -176,7 +176,7 @@ func (w *Searcher) Draw(screen tcell.Screen) {
|
||||
} else {
|
||||
h.BorderFilled(w.x, w.y, w.x+w.w, w.y+w.h, h.BRD_CSIMPLE, dStyle, screen)
|
||||
}
|
||||
w.search.Draw(screen)
|
||||
w.search.DrawOffset(w.GetPos(), screen)
|
||||
x, y := w.x+1, w.y+2
|
||||
var stIdx int
|
||||
if w.cursor > w.h/2 {
|
||||
@@ -199,6 +199,13 @@ func (w *Searcher) Draw(screen tcell.Screen) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (w *Searcher) DrawOffset(c Coord, screen tcell.Screen) {
|
||||
p := w.GetPos()
|
||||
w.SetPos(p.Add(c))
|
||||
w.Draw(screen)
|
||||
w.SetPos(p)
|
||||
}
|
||||
func (w *Searcher) Active() bool { return w.active }
|
||||
func (w *Searcher) SetActive(a bool) {
|
||||
w.active = a
|
||||
|
||||
Reference in New Issue
Block a user