mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-24 02:49:33 +00:00
completes funk-305
This commit is contained in:
parent
45b43108d1
commit
f2d5a80bd1
|
@ -219,7 +219,7 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
favIconBlurred.visible = false;
|
favIconBlurred.visible = false;
|
||||||
add(favIconBlurred);
|
add(favIconBlurred);
|
||||||
|
|
||||||
favIcon = new FlxSprite(380, 40);
|
favIcon = new FlxSprite(favIconBlurred.x, favIconBlurred.y);
|
||||||
favIcon.frames = Paths.getSparrowAtlas('freeplay/favHeart');
|
favIcon.frames = Paths.getSparrowAtlas('freeplay/favHeart');
|
||||||
favIcon.animation.addByPrefix('fav', 'favorite heart', 24, false);
|
favIcon.animation.addByPrefix('fav', 'favorite heart', 24, false);
|
||||||
favIcon.animation.play('fav');
|
favIcon.animation.play('fav');
|
||||||
|
@ -294,21 +294,34 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 255, 27 normal
|
/**
|
||||||
// 220, 27 favourited
|
* Checks whether the song is favorited, and/or has a rank, and adjusts the clipping
|
||||||
|
* for the scenario when the text could be too long
|
||||||
|
*/
|
||||||
public function checkClip():Void
|
public function checkClip():Void
|
||||||
{
|
{
|
||||||
var clipSize:Int = 290;
|
var clipSize:Int = 290;
|
||||||
var clipType:Int = 0;
|
var clipType:Int = 0;
|
||||||
|
|
||||||
if (ranking.visible == true) clipType += 1;
|
if (ranking.visible)
|
||||||
if (favIcon.visible == true) clipType = 2;
|
{
|
||||||
|
favIconBlurred.x = this.x + 370;
|
||||||
|
favIcon.x = favIconBlurred.x;
|
||||||
|
clipType += 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
favIconBlurred.x = favIcon.x = this.x + 405;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (favIcon.visible) clipType += 1;
|
||||||
|
|
||||||
switch (clipType)
|
switch (clipType)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
clipSize = 220;
|
clipSize = 210;
|
||||||
case 1:
|
case 1:
|
||||||
clipSize = 255;
|
clipSize = 245;
|
||||||
}
|
}
|
||||||
songText.clipWidth = clipSize;
|
songText.clipWidth = clipSize;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue