-
Notifications
You must be signed in to change notification settings - Fork 6
box
A Box is a single selectable tile in the box_manager on the entry screen. Each box stores its label text, current screen position, and two animations — one for sliding left/right and one for fading out when selected.
Box(string text, BoxLocation location);Initialises the box with the given display text and destination. Loads the MODE_SELECT texture and creates the move and open animations from the skin.
| Member | Type | Description |
|---|---|---|
text |
string |
Display label drawn on the tile |
location |
BoxLocation |
The destination this box routes to when confirmed |
x |
float |
Current horizontal screen position |
target_x |
float |
Position the move animation is easing toward |
width |
float |
Tile width used for highlight extension calculations |
selected |
bool |
Whether this box is the currently highlighted tile |
move_anim |
Animation* |
Slide animation played during carousel navigation |
open_anim |
Animation* |
Fade-out animation played when the box is confirmed |
void set_position(float x);Sets both x and target_x immediately, with no animation.
void move_to(float target_x);Sets target_x and starts the move_anim so the box eases to the new position.
void set_selected(bool selected);Marks the box as highlighted. The highlighted box is drawn with left/right extension panels.
void start_open();Triggers the open_anim fade-out, played when the player confirms this box.
bool is_animating() const;Returns true while the move_anim is still running, used by box_manager to block further navigation inputs.
void draw();Draws the tile texture at the current x position. If selected, also draws left and right extension highlight panels. The label text is drawn centred on the tile with a small vertical offset.
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