-
Notifications
You must be signed in to change notification settings - Fork 6
costume_menu
The CostumeMenu lets a player customise their character appearance from the entry screen. It operates in two stages: first the player selects a menu item (costume slot, default, head/body toggle, presets, or random), then — if the item requires it — they scroll through available costume icons.
An enum for the items in the menu list.
| Value | Description |
|---|---|
COSTUME |
Opens the icon carousel to pick a specific costume |
DEFAULT |
Resets the character to the default appearance |
HEAD_BODY |
Toggles independent head/body costume selection |
PRESET_1 |
Applies saved preset 1 |
PRESET_2 |
Applies saved preset 2 |
PRESET_3 |
Applies saved preset 3 |
RANDOM_ITEM |
Picks a random costume from the available icons |
CostumeMenu(PlayerNum player_num, bool is_2p);Loads all costume icon PNG files from Models/costume_icon/ in the active skin, initialises the blue-arrow fade and move animations, and sets the initial selected index to COSTUME.
| Member | Type | Description |
|---|---|---|
player_num |
PlayerNum |
Which player this menu belongs to |
is_2p |
bool |
Draws the 2P-side box variant when true
|
selected_index |
int |
Currently highlighted menu item (0–6) |
icon_index |
int |
Currently centred costume icon in the icon carousel |
in_icon_select |
bool |
Whether the player is in the second stage (icon carousel) |
confirmed |
bool |
Set to true once the player finalises a selection |
icons |
vector<Texture> |
Loaded costume icon textures |
arrow_fade_anim |
Animation* |
Opacity pulse on the blue selection arrow |
arrow_move_anim |
Animation* |
Vertical bounce of the blue selection arrow |
bool handle_input();In menu-item stage: up/down moves selected_index; Don confirms the item and either sets confirmed (for DEFAULT, HEAD_BODY, PRESET_*, RANDOM_ITEM) or enters icon-select stage (for COSTUME). Kat cancels and closes the menu.
In icon-select stage: left/right scrolls icon_index through the available icons using modulo arithmetic; Don confirms the selection, saves the costume to config, triggers the character animation, and sets confirmed; Kat returns to the menu-item stage.
Returns true when the menu should be closed (confirmed or cancelled).
void update(double current_time);Advances the arrow_fade_anim and arrow_move_anim.
void draw();In menu-item stage: draws the menu box (1P or 2P variant), a five-item visible window of the seven menu items centred on selected_index, and the blue arrow with its fade and bounce animations.
In icon-select stage: draws the icon carousel with five icons visible, the centre icon highlighted, and animated scrolling as icon_index changes.
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