mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Convert the bulk of modules over to RedrawFunc
This commit is contained in:
@@ -28,12 +28,12 @@ func NewWidget(app *tview.Application, settings *Settings) *Widget {
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
widget.Redraw(widget.CommonSettings().Title, widget.animation(), false)
|
||||
widget.RedrawFunc(widget.animation)
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) animation() string {
|
||||
func (widget *Widget) animation() (string, string, bool) {
|
||||
icons := []string{"|", "/", "-", "\\", "|"}
|
||||
next := icons[widget.CurrentIcon]
|
||||
|
||||
@@ -42,5 +42,5 @@ func (widget *Widget) animation() string {
|
||||
widget.CurrentIcon = 0
|
||||
}
|
||||
|
||||
return next
|
||||
return widget.CommonSettings().Title, next, false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user