1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-09-12 05:07:06 +00:00

capsule alpha stuff in progress

This commit is contained in:
Cameron Taylor 2023-09-19 19:10:30 -04:00 committed by EliteMasterEric
parent 387acd211e
commit 4b1af216d4
2 changed files with 16 additions and 11 deletions

View file

@ -585,11 +585,10 @@ class FreeplayState extends MusicBeatSubState
funnyMenu.y = funnyMenu.intendedY(i + 1) + 10;
funnyMenu.targetPos.x = funnyMenu.x;
funnyMenu.ID = i;
funnyMenu.alpha = 0.5;
funnyMenu.capsule.alpha = 0.5;
funnyMenu.songText.visible = false;
funnyMenu.favIcon.visible = tempSongs[i].isFav;
funnyMenu.hsvShader = hsvShader;
// fp.updateScore(0);
if (i < 8) funnyMenu.initJumpIn(Math.min(i, 4), force);
@ -943,7 +942,7 @@ class FreeplayState extends MusicBeatSubState
function capsuleOnConfirmDefault():Void
{
var poop:String = songs[curSelected].songName.toLowerCase();
// var poop:String = songs[curSelected].songName.toLowerCase();
// does not work properly, always just accidentally sets it to normal anyways!
/* if (!Assets.exists(Paths.json(songs[curSelected].songName + '/' + poop)))
@ -1035,7 +1034,7 @@ class FreeplayState extends MusicBeatSubState
{
index += 1;
capsule.selected = false;
capsule.selected = true;
capsule.targetPos.y = capsule.intendedY(index - curSelected);
capsule.targetPos.x = 270 + (60 * (Math.sin(index - curSelected)));

View file

@ -15,10 +15,11 @@ import funkin.shaderslmfao.Grayscale;
class SongMenuItem extends FlxSpriteGroup
{
var capsule:FlxSprite;
public var capsule:FlxSprite;
var pixelIcon:FlxSprite;
public var selected(default, set):Bool = false;
public var selected(default, set):Bool;
public var songTitle:String = "Test";
@ -108,8 +109,6 @@ class SongMenuItem extends FlxSpriteGroup
// grpHide.add(favIcon);
setVisibleGrp(false);
selected = selected; // just to kickstart the set_selected
}
function set_hsvShader(value:HSVShader):HSVShader
@ -144,6 +143,8 @@ class SongMenuItem extends FlxSpriteGroup
}
if (value) textAppear();
selectedAlpha();
}
public function init(x:Float, y:Float, song:String, ?character:String)
@ -210,14 +211,16 @@ class SongMenuItem extends FlxSpriteGroup
if (force)
{
alpha = 1;
visible = true;
capsule.alpha = 1;
setVisibleGrp(true);
}
else
{
new FlxTimer().start((xFrames.length / 24) * 2.5, function(_) {
visible = true;
capsule.alpha = 1;
setVisibleGrp(true);
alpha = 1;
});
}
}
@ -226,7 +229,9 @@ class SongMenuItem extends FlxSpriteGroup
public function forcePosition()
{
alpha = 1;
visible = true;
capsule.alpha = 1;
selectedAlpha();
doLerp = true;
doJumpIn = false;
doJumpOut = false;
@ -303,6 +308,7 @@ class SongMenuItem extends FlxSpriteGroup
function set_selected(value:Bool):Bool
{
trace("set_selected: " + value);
// cute one liners, lol!
diffGrayscale.setAmount(value ? 0 : 0.8);
songText.alpha = value ? 1 : 0.6;