-
Notifications
You must be signed in to change notification settings - Fork 6
box_folder
This page covers the two box_base subclasses that represent navigable containers in the navigator: FolderBox for regular song directories and DanBox for Dan challenge entries.
FolderBox represents a directory that contains songs or sub-folders. It displays a song count, the best crowns achieved across all songs inside, and supports inline expansion when the directory has no child sub-folders.
FolderBox(const fs::path& path, const BoxDef& box_def,
map<pair<string,string>, fs::path>& song_files);Scans song_files to count how many songs belong to this folder and computes the best Crown per difficulty across all of them. Stores those results in crown and tja_count.
| Member | Type | Description |
|---|---|---|
tja_count |
int |
Number of songs (.tja files) inside this folder |
is_osu_folder |
bool |
true when the folder contains .osu format songs |
crown |
map<int, Crown> |
Best crown achieved per difficulty index across all songs in the folder |
entered |
bool |
true once the player has entered this folder at least once |
enter_fade |
unique_ptr<FadeAnimation> |
Fade animation played on entry |
box_texture |
optional<ray::Texture> |
Custom box texture loaded from box.def, if provided |
hori_name |
unique_ptr<OutlinedText> |
Title text in the horizontal (closed) orientation |
tja_count_text |
unique_ptr<OutlinedText> |
Rendered song-count string |
void load_text() override;Creates hori_name and tja_count_text from the stored name and count. Also loads the custom box_texture from the skin path specified in box.def if present.
void update(double current_time) override;Advances all base animations and the enter_fade.
void refresh_scores(map<pair<string,string>, fs::path>& song_files);Recomputes crown by walking song_files and reloading score data. Called when the navigator performs a global score refresh.
void enter_box() override;Sets entered = true, plays the enter_fade animation, and calls the base expand_box() visuals to signal the navigator to load its contents.
void exit_box() override;Reverses the enter_fade and resets the visual state for re-display in the parent list.
void draw_closed() override; // protectedDraws the folded box: background texture (custom or genre-default), folder name, song count, and crown icons.
void draw_open() override; // protectedDraws the expanded folder header shown while the inline song list is loading or displayed.
// private
void draw_open_bg(float fade);
void draw_open_fg(float fade);Split the open-state draw into background and foreground layers so the box_base can be sandwiched between them.
DanBox represents a Dan challenge — a fixed sequence of songs with pass/fail conditions. It is read from a dedicated Dan definition file rather than a directory.
DanBox(const fs::path& path, const string& title, int color,
const vector<DanSongEntry>& songs, const vector<Exam>& exams,
int total_notes);Stores the challenge title, colour code, song list, exam conditions, and total note count.
| Member | Type | Description |
|---|---|---|
dan_title |
string |
Display name of the Dan challenge |
dan_color |
int |
Colour index controlling the box's visual theme |
songs |
vector<DanSongEntry> |
Ordered list of songs in the challenge |
exams |
vector<Exam> |
Pass/fail conditions evaluated at the end of the run |
total_notes |
int |
Total note count across all songs, shown on the expanded box |
hori_name |
unique_ptr<OutlinedText> |
Challenge title in horizontal orientation |
song_texts |
vector<pair<OutlinedText, OutlinedText>> |
Per-song title and subtitle text pairs |
void load_text() override;Creates hori_name and all song_texts pairs from the stored song list.
void update(double current_ms) override;Advances base animations. No preview music or score logic.
void draw_closed() override; // protectedDraws the Dan box with its themed colour stripe and challenge title.
void draw_open() override; // protectedDraws the expanded view: challenge title, total note count, the list of songs with their titles, and the exam condition boxes.
void draw_diff_select(bool is_ura) override; // protectedCalls draw_open() — Dan challenges do not have a separate difficulty-select view since the course is fixed.
// private
void draw_exam_box();Renders the exam condition panels showing each pass/fail criterion.
// private
void draw_digit_counter(const string& digits, float margin_x, float y, TexID digit_tex);Renders a numeric value using individual digit textures, right-aligned from margin_x.
Building
libs
- animation
- audio
- config
- filesystem
- global_data
- input
- logging
- ray
- scores
- screen
- script
- song_parser
- text
- texture
- video
- webcam
libs/parsers
objects
objects/game
- player
- background
- gauge
- judgment
- combo
- branch_indicator
- ending_animations
- gogo_time
- fireworks
- song_info
- transition
- result_transition
- judge_counter
- score_counter
- score_counter_animation
- balloon_counter
- drumroll_counter
- kusudama_counter
- drum_hit_effect
- lane_hit_effect
- gauge_hit_effect
- combo_announce
- note_arc
objects/global
objects/title
objects/entry
objects/settings
objects/result
objects/song_select
- player
- navigator
- box_base
- box_song
- box_folder
- neiro
- modifier
- ura_switch
- diff_sort
- search_box
- dan_transition
- genre_bg
- score_history
- song_select_script
scenes