You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
570 B
Go

package app
import (
"fmt"
"github.com/gdamore/tcell/v2"
"github.com/jordanorelli/astro-domu/internal/math"
)
type statusBar struct {
inFocus bool
msgCount int
showCount int
clearCount int
}
func (s *statusBar) handleEvent(ui *UI, e tcell.Event) bool { return false }
func (s *statusBar) draw(img canvas, st *state) {
line := fmt.Sprintf("shown: %08d cleared: %08d messages: %08d", s.showCount, s.clearCount, s.msgCount)
writeString(img, line, math.Vec{0, 0}, tcell.StyleDefault)
}
func (s *statusBar) setFocus(enabled bool) { s.inFocus = enabled }