Skip to content

drumroll_counter

Anthony Samms edited this page Jun 2, 2026 · 1 revision

The DrumrollCounter shows the running hit count during a drumroll note. It appears when the drumroll begins, increments with each hit, and fades out when the drumroll ends. Owned by player as optional<DrumrollCounter>.

DrumrollCounter

Construction

DrumrollCounter();

Initialises drumroll_count to zero and allocates fade and stretch.

Members

Member Type Description
drumroll_count int Number of hits registered so far on the current drumroll
fade FadeAnimation* Fade-out played when the drumroll ends
stretch TextStretchAnimation* Scale pulse on each new hit

Methods

void update_count(int count);

Sets drumroll_count = count and restarts stretch.

void update(double current_ms, int count);

Advances fade and stretch. When the drumroll has ended (signalled by player), starts fade.

void draw(float y);

Renders the current hit count at the configured position, offset by y for 2P.

bool is_finished() const;

Returns true when fade has completed.

Clone this wiki locally