Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT] Flash capsules slightly less when flashing lights are turned off #4224

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions source/funkin/ui/freeplay/SongMenuItem.hx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import funkin.save.Save;
import funkin.save.Save.SaveScoreData;
import flixel.util.FlxColor;
import funkin.ui.PixelatedIcon;
import funkin.Preferences;

class SongMenuItem extends FlxSpriteGroup
{
Expand Down Expand Up @@ -236,9 +237,12 @@ class SongMenuItem extends FlxSpriteGroup

function sparkleEffect(timer:FlxTimer):Void
{
sparkle.setPosition(FlxG.random.float(ranking.x - 20, ranking.x + 3), FlxG.random.float(ranking.y - 29, ranking.y + 4));
sparkle.animation.play('sparkle', true);
sparkleTimer = new FlxTimer().start(FlxG.random.float(1.2, 4.5), sparkleEffect);
if (Preferences.flashingLights)
{
sparkle.setPosition(FlxG.random.float(ranking.x - 20, ranking.x + 3), FlxG.random.float(ranking.y - 29, ranking.y + 4));
sparkle.animation.play('sparkle', true);
sparkleTimer = new FlxTimer().start(FlxG.random.float(1.2, 4.5), sparkleEffect);
}
}

// no way to grab weeks rn, so this needs to be done :/
Expand Down Expand Up @@ -697,7 +701,7 @@ class SongMenuItem extends FlxSpriteGroup
*/
public function confirm():Void
{
if (songText != null) songText.flickerText();
if (songText != null && Preferences.flashingLights) songText.flickerText();
if (pixelIcon != null && pixelIcon.visible)
{
pixelIcon.animation.play('confirm');
Expand Down
Loading