-
Notifications
You must be signed in to change notification settings - Fork 6
score_history
The ScoreHistory class displays the player's saved score for the currently selected song in the song-select screen. When scores exist for multiple difficulties it cycles through them automatically, showing each one for one second. Owned by box_song.
ScoreHistory(const array<optional<Score>, 5>& scores, double current_ms);| Parameter | Description |
|---|---|
scores |
Array of five optional Score values, one per difficulty slot (Easy through Ura) |
current_ms |
Current song-select timestamp, used as the starting reference for the one-second timer |
Filters out empty slots and populates available with only the difficulties that have a recorded score. curr_index starts at 1 % available.size() so the first score shown on the next cycle is not the same as the initial one.
| Member | Type | Description |
|---|---|---|
available |
vector<DiffScore> |
Scores that actually exist, each paired with their difficulty index |
curr_index |
int |
Index into available for the currently displayed entry |
last_ms |
double |
Timestamp of the last cycle step |
Private helper struct.
| Field | Type | Description |
|---|---|---|
diff |
int |
Difficulty index (0 = Easy, 4 = Ura) |
score |
Score |
The saved score data for that difficulty |
void update(double current_ms);Does nothing if available is empty. Otherwise advances curr_index by one (wrapping) whenever at least 1000 ms has elapsed since last_ms, then updates last_ms.
void draw();Does nothing if available is empty. Calls draw_long() to render the full score panel for the current entry.
void draw_long();Renders the full score panel using LEADERBOARD textures. Shows:
- Background and title strip.
- Score mode indicator (
SHINUCHIorNORMAL) andPTSlabel with colour adjusted for the mode. - Difficulty badge for
curr_diff. - Four row backgrounds for the judge lines.
-
JUDGE_GOOD,JUDGE_OK,JUDGE_BAD, andJUDGE_DRUMROLLlabel textures. - Score, good, ok, bad, and drumroll values as right-aligned digit strings using
LEADERBOARD::COUNTERandLEADERBOARD::JUDGE_NUMtextures.
void draw_short();Renders a compact single-score panel (score only, no per-judge breakdown). Used when the panel area is too narrow for the full view. Currently not called by draw() but available for callers that need the short form.
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