mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-25 14:46:43 +00:00
Merge branch 'ninjamuffin99/funk-268' into rewrite/master
This commit is contained in:
commit
bbbe2248f8
|
@ -58,12 +58,24 @@ class CapsuleText extends FlxSpriteGroup
|
||||||
function set_clipWidth(value:Int):Int
|
function set_clipWidth(value:Int):Int
|
||||||
{
|
{
|
||||||
resetText();
|
resetText();
|
||||||
if (whiteText.width > value)
|
checkClipWidth(value);
|
||||||
|
return clipWidth = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the text if it's too long, and clips if it is
|
||||||
|
* @param wid
|
||||||
|
*/
|
||||||
|
function checkClipWidth(?wid:Int):Void
|
||||||
|
{
|
||||||
|
if (wid == null) wid = clipWidth;
|
||||||
|
|
||||||
|
if (whiteText.width > wid)
|
||||||
{
|
{
|
||||||
tooLong = true;
|
tooLong = true;
|
||||||
|
|
||||||
blurredText.clipRect = new FlxRect(0, 0, value, blurredText.height);
|
blurredText.clipRect = new FlxRect(0, 0, wid, blurredText.height);
|
||||||
whiteText.clipRect = new FlxRect(0, 0, value, whiteText.height);
|
whiteText.clipRect = new FlxRect(0, 0, wid, whiteText.height);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -72,7 +84,6 @@ class CapsuleText extends FlxSpriteGroup
|
||||||
blurredText.clipRect = null;
|
blurredText.clipRect = null;
|
||||||
whiteText.clipRect = null;
|
whiteText.clipRect = null;
|
||||||
}
|
}
|
||||||
return clipWidth = value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_text(value:String):String
|
function set_text(value:String):String
|
||||||
|
@ -86,6 +97,7 @@ class CapsuleText extends FlxSpriteGroup
|
||||||
|
|
||||||
blurredText.text = value;
|
blurredText.text = value;
|
||||||
whiteText.text = value;
|
whiteText.text = value;
|
||||||
|
checkClipWidth();
|
||||||
whiteText.textField.filters = [
|
whiteText.textField.filters = [
|
||||||
new openfl.filters.GlowFilter(0x00ccff, 1, 5, 5, 210, BitmapFilterQuality.MEDIUM),
|
new openfl.filters.GlowFilter(0x00ccff, 1, 5, 5, 210, BitmapFilterQuality.MEDIUM),
|
||||||
// new openfl.filters.BlurFilter(5, 5, BitmapFilterQuality.LOW)
|
// new openfl.filters.BlurFilter(5, 5, BitmapFilterQuality.LOW)
|
||||||
|
|
|
@ -326,7 +326,7 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
|
|
||||||
var evilTrail:FlxTrail;
|
var evilTrail:FlxTrail;
|
||||||
|
|
||||||
public function fadeAnim()
|
public function fadeAnim():Void
|
||||||
{
|
{
|
||||||
impactThing = new FunkinSprite(0, 0);
|
impactThing = new FunkinSprite(0, 0);
|
||||||
impactThing.frames = capsule.frames;
|
impactThing.frames = capsule.frames;
|
||||||
|
@ -671,14 +671,9 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
ranking.alpha = this.selected ? 1 : 0.7;
|
ranking.alpha = this.selected ? 1 : 0.7;
|
||||||
ranking.color = this.selected ? 0xFFFFFFFF : 0xFFAAAAAA;
|
ranking.color = this.selected ? 0xFFFFFFFF : 0xFFAAAAAA;
|
||||||
|
|
||||||
if (selected)
|
if (songText.tooLong) songText.resetText();
|
||||||
{
|
|
||||||
if (songText.tooLong == true) songText.initMove();
|
if (selected && songText.tooLong) songText.initMove();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (songText.tooLong == true) songText.resetText();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue