MCPcopy
hub / github.com/mum4k/termdash / Done

Method Done

widgets/fx/fx.go:167–178  ·  view source on GitHub ↗

Done reports whether all effects have finished playing. Always returns false for a looping EffectWidget.

()

Source from the content-addressed store, hash-verified

165// Done reports whether all effects have finished playing.
166// Always returns false for a looping EffectWidget.
167func (w *EffectWidget) Done() bool {
168 if w.loop {
169 return false
170 }
171 w.mu.Lock()
172 defer w.mu.Unlock()
173 if !w.started {
174 return false
175 }
176 elapsed := time.Since(w.startTime)
177 return elapsed >= totalDuration(w.effects)
178}
179
180// Draw implements widgetapi.Widget.
181func (w *EffectWidget) Draw(cvs *canvas.Canvas, meta *widgetapi.Meta) error {

Callers 15

processEventsMethod · 0.80
startMethod · 0.80
periodicFunction · 0.80
newSegmentDisplayFunction · 0.80
animateVisualizeFunction · 0.80
animateExplorerFunction · 0.80
animateThreeDFunction · 0.80
runMethod · 0.80
PullMethod · 0.80
WaitForFunction · 0.80
clockFunction · 0.80
rollTextFunction · 0.80

Calls 1

totalDurationFunction · 0.85