mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-23 08:07:54 -05:00
cute hearts
This commit is contained in:
parent
9c2efc4d0e
commit
085cc45253
2 changed files with 33 additions and 2 deletions
|
@ -381,6 +381,7 @@ class FreeplayState extends MusicBeatSubstate
|
|||
funnyMenu.ID = i;
|
||||
funnyMenu.alpha = 0.5;
|
||||
funnyMenu.songText.visible = false;
|
||||
funnyMenu.favIcon.visible = tempSongs[i].isFav;
|
||||
|
||||
fp.updateScore(0);
|
||||
|
||||
|
@ -473,11 +474,32 @@ class FreeplayState extends MusicBeatSubstate
|
|||
|
||||
if (FlxG.keys.justPressed.F)
|
||||
{
|
||||
var realShit = curSelected;
|
||||
songs[curSelected].isFav = !songs[curSelected].isFav;
|
||||
if (songs[curSelected].isFav)
|
||||
FlxTween.tween(grpCapsules.members[curSelected], {angle: 360}, 0.4, {ease: FlxEase.elasticOut});
|
||||
{
|
||||
|
||||
FlxTween.tween(grpCapsules.members[realShit], {angle: 360}, 0.4, {
|
||||
ease: FlxEase.elasticOut,
|
||||
onComplete: _ ->
|
||||
{
|
||||
grpCapsules.members[realShit].favIcon.visible = true;
|
||||
grpCapsules.members[realShit].favIcon.animation.play("fav");
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
FlxTween.tween(grpCapsules.members[curSelected], {angle: 0}, 0.4, {ease: FlxEase.elasticOut});
|
||||
{
|
||||
grpCapsules.members[realShit].favIcon.animation.play('fav', false, true);
|
||||
new FlxTimer().start((1 / 24) * 14, _ ->
|
||||
{
|
||||
grpCapsules.members[realShit].favIcon.visible = false;
|
||||
});
|
||||
new FlxTimer().start((1 / 24) * 24, _ ->
|
||||
{
|
||||
FlxTween.tween(grpCapsules.members[realShit], {angle: 0}, 0.4, {ease: FlxEase.elasticOut});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.T)
|
||||
|
|
|
@ -17,6 +17,7 @@ class SongMenuItem extends FlxSpriteGroup
|
|||
public var songTitle:String = "Test";
|
||||
|
||||
public var songText:FlxText;
|
||||
public var favIcon:FlxSprite;
|
||||
|
||||
public var targetPos:FlxPoint = new FlxPoint();
|
||||
public var doLerp:Bool = false;
|
||||
|
@ -40,6 +41,14 @@ class SongMenuItem extends FlxSpriteGroup
|
|||
songText.color = 0xFF43C1EA;
|
||||
add(songText);
|
||||
|
||||
favIcon = new FlxSprite(440, 40);
|
||||
favIcon.frames = Paths.getSparrowAtlas('freeplay/favHeart');
|
||||
favIcon.animation.addByPrefix('fav', "favorite heart", 24, false);
|
||||
favIcon.animation.play('fav');
|
||||
favIcon.antialiasing = true;
|
||||
favIcon.setGraphicSize(60, 60);
|
||||
add(favIcon);
|
||||
|
||||
selected = selected; // just to kickstart the set_selected
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue