Skip to main content

Module indicator

Module indicator 

Expand description

The cadence of looping indicators: a spinner, a tab’s busy arc, a sweeping bar.

An indicator only says “still working”; it does not need the display’s full refresh to say it. It moves in steps of INDICATOR_STEP and repaints (damages its own bounds, presents) only when its step changes, so one busy mark on screen costs a few frames a second instead of every refresh. Under reduced motion it stands still (EffectiveMotion::loops).

Constants§

INDICATOR_STEP
One step of a looping indicator: 30 a second.

Functions§

indicator_elapsed
Time since epoch at the start of the step now falls in: what an indicator draws, so its pose changes once per step.
indicator_phase
Where in a loop period long an indicator stands at now, 0..1, taken at the start of the step now falls in.
indicator_step
The step now falls in, counted from the indicator’s epoch.
next_indicator_step
When the step after the one now falls in begins.