From bcc76efaa54f8d017096e65aa774110f864c2648 Mon Sep 17 00:00:00 2001 From: digitallyserviced Date: Mon, 3 Jul 2023 16:21:05 -0400 Subject: [PATCH] add setdontclear for cases where padding and borders arent cleared with bg color --- box.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/box.go b/box.go index 0941bb7..7c268d7 100644 --- a/box.go +++ b/box.go @@ -82,6 +82,13 @@ func NewBox() *Box { return b } +// SetDontClear sets whether the draw function +// clears the bg with defined color +func (b *Box) SetDontClear(dontClear bool) *Box { + b.dontClear = dontClear + return b +} + // SetBorderPadding sets the size of the borders around the box content. func (b *Box) SetBorderPadding(top, bottom, left, right int) *Box { b.paddingTop, b.paddingBottom, b.paddingLeft, b.paddingRight = top, bottom, left, right