mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-09-19 00:21:11 +00:00
capsule alpha stuff in progress
This commit is contained in:
parent
387acd211e
commit
4b1af216d4
|
@ -585,11 +585,10 @@ class FreeplayState extends MusicBeatSubState
|
||||||
funnyMenu.y = funnyMenu.intendedY(i + 1) + 10;
|
funnyMenu.y = funnyMenu.intendedY(i + 1) + 10;
|
||||||
funnyMenu.targetPos.x = funnyMenu.x;
|
funnyMenu.targetPos.x = funnyMenu.x;
|
||||||
funnyMenu.ID = i;
|
funnyMenu.ID = i;
|
||||||
funnyMenu.alpha = 0.5;
|
funnyMenu.capsule.alpha = 0.5;
|
||||||
funnyMenu.songText.visible = false;
|
funnyMenu.songText.visible = false;
|
||||||
funnyMenu.favIcon.visible = tempSongs[i].isFav;
|
funnyMenu.favIcon.visible = tempSongs[i].isFav;
|
||||||
funnyMenu.hsvShader = hsvShader;
|
funnyMenu.hsvShader = hsvShader;
|
||||||
|
|
||||||
// fp.updateScore(0);
|
// fp.updateScore(0);
|
||||||
|
|
||||||
if (i < 8) funnyMenu.initJumpIn(Math.min(i, 4), force);
|
if (i < 8) funnyMenu.initJumpIn(Math.min(i, 4), force);
|
||||||
|
@ -943,7 +942,7 @@ class FreeplayState extends MusicBeatSubState
|
||||||
|
|
||||||
function capsuleOnConfirmDefault():Void
|
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!
|
// does not work properly, always just accidentally sets it to normal anyways!
|
||||||
/* if (!Assets.exists(Paths.json(songs[curSelected].songName + '/' + poop)))
|
/* if (!Assets.exists(Paths.json(songs[curSelected].songName + '/' + poop)))
|
||||||
|
@ -1035,7 +1034,7 @@ class FreeplayState extends MusicBeatSubState
|
||||||
{
|
{
|
||||||
index += 1;
|
index += 1;
|
||||||
|
|
||||||
capsule.selected = false;
|
capsule.selected = true;
|
||||||
|
|
||||||
capsule.targetPos.y = capsule.intendedY(index - curSelected);
|
capsule.targetPos.y = capsule.intendedY(index - curSelected);
|
||||||
capsule.targetPos.x = 270 + (60 * (Math.sin(index - curSelected)));
|
capsule.targetPos.x = 270 + (60 * (Math.sin(index - curSelected)));
|
||||||
|
|
|
@ -15,10 +15,11 @@ import funkin.shaderslmfao.Grayscale;
|
||||||
|
|
||||||
class SongMenuItem extends FlxSpriteGroup
|
class SongMenuItem extends FlxSpriteGroup
|
||||||
{
|
{
|
||||||
var capsule:FlxSprite;
|
public var capsule:FlxSprite;
|
||||||
|
|
||||||
var pixelIcon:FlxSprite;
|
var pixelIcon:FlxSprite;
|
||||||
|
|
||||||
public var selected(default, set):Bool = false;
|
public var selected(default, set):Bool;
|
||||||
|
|
||||||
public var songTitle:String = "Test";
|
public var songTitle:String = "Test";
|
||||||
|
|
||||||
|
@ -108,8 +109,6 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
// grpHide.add(favIcon);
|
// grpHide.add(favIcon);
|
||||||
|
|
||||||
setVisibleGrp(false);
|
setVisibleGrp(false);
|
||||||
|
|
||||||
selected = selected; // just to kickstart the set_selected
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_hsvShader(value:HSVShader):HSVShader
|
function set_hsvShader(value:HSVShader):HSVShader
|
||||||
|
@ -144,6 +143,8 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value) textAppear();
|
if (value) textAppear();
|
||||||
|
|
||||||
|
selectedAlpha();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function init(x:Float, y:Float, song:String, ?character:String)
|
public function init(x:Float, y:Float, song:String, ?character:String)
|
||||||
|
@ -210,14 +211,16 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
|
|
||||||
if (force)
|
if (force)
|
||||||
{
|
{
|
||||||
alpha = 1;
|
visible = true;
|
||||||
|
capsule.alpha = 1;
|
||||||
setVisibleGrp(true);
|
setVisibleGrp(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new FlxTimer().start((xFrames.length / 24) * 2.5, function(_) {
|
new FlxTimer().start((xFrames.length / 24) * 2.5, function(_) {
|
||||||
|
visible = true;
|
||||||
|
capsule.alpha = 1;
|
||||||
setVisibleGrp(true);
|
setVisibleGrp(true);
|
||||||
alpha = 1;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,7 +229,9 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
|
|
||||||
public function forcePosition()
|
public function forcePosition()
|
||||||
{
|
{
|
||||||
alpha = 1;
|
visible = true;
|
||||||
|
capsule.alpha = 1;
|
||||||
|
selectedAlpha();
|
||||||
doLerp = true;
|
doLerp = true;
|
||||||
doJumpIn = false;
|
doJumpIn = false;
|
||||||
doJumpOut = false;
|
doJumpOut = false;
|
||||||
|
@ -303,6 +308,7 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
|
|
||||||
function set_selected(value:Bool):Bool
|
function set_selected(value:Bool):Bool
|
||||||
{
|
{
|
||||||
|
trace("set_selected: " + value);
|
||||||
// cute one liners, lol!
|
// cute one liners, lol!
|
||||||
diffGrayscale.setAmount(value ? 0 : 0.8);
|
diffGrayscale.setAmount(value ? 0 : 0.8);
|
||||||
songText.alpha = value ? 1 : 0.6;
|
songText.alpha = value ? 1 : 0.6;
|
||||||
|
|
Loading…
Reference in a new issue