X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=screen%2Fscreen.go;h=4d40793d3404d827d20571d2f8cdcbb660988464;hb=HEAD;hp=41aa4aa4e395fcf97566202bb60f74e713e26161;hpb=f135d1827d906507807e5d5687a4806b63286df4;p=pstop.git diff --git a/screen/screen.go b/screen/screen.go index 41aa4aa..4d40793 100644 --- a/screen/screen.go +++ b/screen/screen.go @@ -33,7 +33,7 @@ func (s *TermboxScreen) BoldPrintAt(x int, y int, text string) { // clear the screen func (s *TermboxScreen) Clear() { - termbox.Clear(termbox.ColorWhite, termbox.ColorBlack) + termbox.Clear(termbox.ColorDefault, termbox.ColorDefault) } // close the screen @@ -98,6 +98,14 @@ func (s *TermboxScreen) PrintAt(x int, y int, text string) { s.Flush() } +// Clear EOL +func (s *TermboxScreen) ClearLine(x int, y int) { + for i := x; i < s.width; i++ { + termbox.SetCell(i, y, ' ', termbox.ColorDefault, termbox.ColorDefault) + } + s.Flush() +} + // set the screen size func (s *TermboxScreen) SetSize(width, height int) { // if we get bigger then clear out the bottom line