Skip to content

judge_counter

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

The JudgeCounter displays a running tally of the player's GOOD, OK, BAD, and drumroll hit counts in a compact bar at the top of the screen. It is owned by player as optional<JudgeCounter>.

JudgeCounter

Construction

JudgeCounter();

Initialises all counts to zero.

Members

Member Type Description
good int Current GOOD count
ok int Current OK count
bad int Current BAD count
drumrolls int Current drumroll count
orange ray::Color Colour used for GOOD/OK
white ray::Color Colour used for BAD

Methods

void update(int good, int ok, int bad, int drumrolls);

Replaces the stored counts with the values from player::get_good() etc. Called each frame.

void draw();

Renders the four counters in a horizontal row at the configured screen position. Each counter calls the private draw_counter() helper.

Private methods

void draw_counter(float counter, float x, float y, float margin, ray::Color color);

Draws a single numeric counter as right-aligned digits at (x, y), spaced by margin, tinted with color.

Clone this wiki locally