Skip to content

branch_indicator

Anthony Samms edited this page Jun 2, 2026 · 1 revision

The BranchIndicator shows the player which branch difficulty they have moved to when the chart's branching condition is evaluated. It plays a short level-up or level-down animation and is owned by player as an optional<BranchIndicator>.

BranchIndicator

Construction

BranchIndicator();

Allocates all animations and initialises difficulty to BranchDifficulty::NORMAL.

Members

Member Type Description
difficulty BranchDifficulty The branch level currently being displayed (public)
diff_2 BranchDifficulty The destination difficulty, set when a transition starts
diff_down MoveAnimation* Downward slide for the old difficulty label
diff_up MoveAnimation* Upward slide for the new difficulty label
diff_fade FadeAnimation* Fade-out for the old label
level_fade FadeAnimation* Fade-in for the level icon
level_scale TextureResizeAnimation* Scale pulse for the level icon
direction int +1 for level-up, -1 for level-down

BranchDifficulty

Value Description
NORMAL Normal branch path
EXPERT Expert branch path
MASTER Master branch path

Methods

void level_up(BranchDifficulty difficulty);

Sets diff_2 = difficulty, direction = +1, and starts all transition animations.

void level_down(BranchDifficulty difficulty);

Sets diff_2 = difficulty, direction = -1, and starts all transition animations.

void update(double current_ms);

Advances all animations. Once the transition completes, difficulty is set to diff_2.

void draw(float y);

Draws the difficulty label and level icon at the configured position, offset by y in 2P layouts.

Clone this wiki locally