-
Notifications
You must be signed in to change notification settings - Fork 6
settings_box
A SettingsBox is a single category tile on the settings screen — for example "General", "Audio", or "Video". Each box holds a label and a list of option_box, one per configurable setting in that category. Boxes slide vertically as the player navigates between them.
SettingsBox(const json& box_data);Parses a single box entry from settings_template.json. Constructs the appropriate option_box subclass for each option listed in the entry and stores them in options.
| Member | Type | Description |
|---|---|---|
label |
OutlinedText |
Localised category name drawn on the tile |
options |
vector<unique_ptr<BaseOptionBox>> |
All configurable options belonging to this category |
selected_option |
int |
Index of the currently highlighted option within this box |
in_box |
bool |
Whether the player is currently browsing this box's options |
y |
float |
Current vertical screen position |
target_y |
float |
Position the slide animation is easing toward |
void move_left();
void move_right();Forwards the directional input to the active option_box, changing its value.
void next_option();
void prev_option();Moves the selection to the next or previous option within the box. Options do not wrap.
void set_y(float y);Immediately sets both y and target_y with no animation.
void slide_to(float target_y);Sets target_y and plays the slide animation. Y positions are clamped between −50 and 650 px so off-screen boxes are not drawn unnecessarily.
void draw();Renders in the following order:
-
BOX::BOX— tile background texture at the currentyposition. -
BOX::BOX_HIGHLIGHT— highlight overlay when this box is selected. - If
in_boxistrue: the active option_box's full content (description, value buttons). - Blue arrow indicators (
BACKGROUND::BLUE_ARROW) on either side when an option is navigable but not currently highlighted. - The
labeltext centred on the tile.
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