Skip to content

Commit b0b0a6e

Browse files
committed
add capsule confirm
1 parent d79a0c7 commit b0b0a6e

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

src/funkin/objects/ui/PixelIcon.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class PixelIcon extends FunkinSprite
5151
active = true;
5252
addAnimation('idle', 'idle', null, 10, true);
5353
addAnimation('confirm', 'confirm', null, 10, false);
54-
addAnimation('confirm', 'confirm', null, 10, true);
54+
addAnimation('confirm-hold', 'confirm-hold', null, 10, true);
5555

5656
onAnimFinished.add((name:String) ->
5757
{

src/funkin/objects/ui/freeplay/FreeplayCapsule.hx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@ class FreeplayCapsule extends FlxSpriteGroup
9393
super.update(elapsed);
9494
}
9595

96+
/**
97+
* Play any animations associated with selecting this song.
98+
*/
99+
public function confirm():Void
100+
{
101+
if (capsuleText != null)
102+
capsuleText.flickerText();
103+
104+
if (icon != null && icon.visible && icon.animated)
105+
{
106+
icon.playAnimation('confirm');
107+
}
108+
}
109+
96110
/**
97111
* Get the y position to show in Freeplay.
98112
* @param index The freeplay position.

src/funkin/states/ui/FreeplayState.hx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,9 @@ class FreeplayState extends FunkinState
428428
public function enterSong():Void
429429
{
430430
FlxG.sound.play(Paths.content.audio('ui/menu/confirmMenu'));
431-
backingCard.confirm();
432431
dj.confirm();
432+
grpCapsules.members[curSelected + 1]?.confirm();
433+
backingCard.confirm();
433434
blockInputs = true;
434435

435436
new FlxTimer().start(2, (_) ->

0 commit comments

Comments
 (0)