2019-09-10 02:35:16 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
|
|
|
//------------------------------------------------\\
|
|
|
|
// + + + T Y P E S + + + \\
|
|
|
|
//--------------------------------------------------\\
|
|
|
|
|
|
|
|
type Footbar struct {
|
2019-09-12 05:53:36 +00:00
|
|
|
PercentRead int
|
2019-09-10 02:35:16 +00:00
|
|
|
PageType string
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------\\
|
|
|
|
// + + + R E C E I V E R S + + + \\
|
|
|
|
//--------------------------------------------------\\
|
|
|
|
|
|
|
|
func (f *Footbar) SetPercentRead(p int) {
|
2019-09-12 05:53:36 +00:00
|
|
|
f.PercentRead = p
|
2019-09-10 02:35:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (f *Footbar) SetPageType(t string) {
|
|
|
|
f.PageType = t
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *Footbar) Draw() {
|
|
|
|
// TODO this will actually draw the bar
|
|
|
|
// without having to redraw everything else
|
|
|
|
}
|
|
|
|
|
2019-09-12 05:53:36 +00:00
|
|
|
func (f *Footbar) Render(termWidth int) string {
|
|
|
|
return fmt.Sprintf("\033[7m%-*.*s\033[0m", termWidth, termWidth, "")
|
2019-09-10 02:35:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------\\
|
|
|
|
// + + + F U N C T I O N S + + + \\
|
|
|
|
//--------------------------------------------------\\
|
|
|
|
|
|
|
|
func MakeFootbar() Footbar {
|
2019-09-12 05:53:36 +00:00
|
|
|
return Footbar{100, "N/A"}
|
2019-09-10 02:35:16 +00:00
|
|
|
}
|
|
|
|
|