adding a status bar, to be removed hopefullyyyyy
parent
ca5ccbf7c9
commit
3f6f825c4c
@ -0,0 +1,25 @@
|
|||||||
|
package app
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/gdamore/tcell/v2"
|
||||||
|
"github.com/jordanorelli/astro-domu/internal/math"
|
||||||
|
)
|
||||||
|
|
||||||
|
type statusBar struct {
|
||||||
|
inFocus bool
|
||||||
|
ui *UI
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *statusBar) handleEvent(ui *UI, e tcell.Event) bool { return false }
|
||||||
|
|
||||||
|
func (s *statusBar) draw(b *buffer) {
|
||||||
|
if s.ui == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
line := fmt.Sprintf("shown: %08d cleared: %08d", s.ui.showCount, s.ui.clearCount)
|
||||||
|
b.writeString(line, math.Vec{0, 0}, tcell.StyleDefault)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *statusBar) setFocus(enabled bool) { s.inFocus = enabled }
|
Loading…
Reference in New Issue