Skip to content

diff_sort

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

DiffSortSelect is the overlay that lets a player filter the song list by difficulty course and level. It is shown on the song_select screen when the player enters a folder whose box.def declares the DIFFICULTY collection type.

The selector operates in two phases: first the player chooses a course (Easy, Normal, Hard, Oni), then a level (1–10). Statistics for each combination are shown alongside the selection to help the player find appropriately ranked songs.

DiffSortSelect

DiffSortSelect(Statistics statistics, int prev_diff, int prev_level);

Initialises with pre-computed navigator, and restores selected_box and selected_level from the previous filter (prev_diff, prev_level) so the selector remembers the last choice. Retrieves all skin animations.

Methods

void update(double current_ms);

Advances all animations: background resize, the fade-in, box flicker, bounce animations, and the blue arrow indicator.

void input_left();
void input_right();

Navigate within the current phase. In course-select phase, cycles between courses. In level-select phase, cycles between levels 1–10, wrapping around.

optional<pair<int,int>> input_select();

Confirms the current selection. On first call, advances from course-select into level-select. On second call, returns the selected {course, level} pair. Returns nullopt while still navigating.

void draw();

Draws the full overlay: background panel, course boxes (with flicker on the selected one), level selector, statistics readout, and navigation arrows.

Private Draw Helpers

void draw_statistics();

Renders the CourseStats for the selected combination: total songs, full combos, and clears.

void draw_diff_select();

Draws the course selection row.

void draw_level_select();

Draws the level 1–10 number row, shown only after a course has been confirmed.

Clone this wiki locally