feat(box): Add `GetBackgroundColor`

This commit is contained in:
Andreas Bieber 2020-09-16 13:29:51 +02:00
parent 02c4995bb2
commit ecfa14af14
1 changed files with 7 additions and 0 deletions

7
box.go
View File

@ -303,6 +303,13 @@ func (b *Box) SetBackgroundColor(color tcell.Color) *Box {
return b
}
// GetBackgroundColor returns the box's background color.
func (b *Box) GetBackgroundColor() tcell.Color {
b.l.RLock()
defer b.l.RUnlock()
return b.backgroundColor
}
// SetBackgroundTransparent sets the flag indicating whether or not the box's
// background is transparent.
func (b *Box) SetBackgroundTransparent(transparent bool) *Box {