Closed sofian closed 2 years ago
I'm not 100% sure whether we should do this after all cause there are already units that do the job: Metro (similar to Timer but not the same cause it only activates for one frame while Timer is more like a clock that needs to be restarted) and TriOsc (for a repetitive Ramp).
But still ... it could make more sense and be more logical to keep Timer and Ramp to be compatible with the rest of the system. Here is what each do: | Repetitive | Needs restart | |
---|---|---|---|
Digital | Metro | Timer | |
Analog | TriOsc | ProgressBar (*) |
(*) Ramp also fits in that category as a special / advanced case.
In fact, Timer should be a PqDigitalGetter and Ramp should be a PqGetter (perhaps even a PqMappable). Currently this is not feasible as since both inhering from AbstractTimer we would get a situation with a "diamond problem" which we want to avoid.
Here is a tentative solution:
class ProgressBar : public PqGetter, public PqMappable
(and uses a Chrono inside)class Timer : public PqDigitalGetter
(and uses a Chrono inside)class Ramp : public ProgressBar
Only things are: