Skip to content

Commit d874ea0

Browse files
authored
Fix an oversight with the alphabet getting the wrong width of an component (#937)
1 parent d80b7b9 commit d874ea0

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

source/funkin/menus/ui/Alphabet.hx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ final class AlphabetComponent {
3636
public var cos:Float;
3737
public var scaleX:Float;
3838
public var scaleY:Float;
39-
39+
4040
public var flipX:Bool;
4141
public var flipY:Bool;
4242

@@ -281,7 +281,7 @@ class Alphabet extends FlxSprite {
281281
var anim = getLetterAnim(letter, data, __component, i);
282282
//if (cantrace)
283283
//trace(anim.name + " | " + __component.anim + " | " + frames.frames[anim.frames[0]]);
284-
advance = (Math.isNaN(advance)) ? getAdvance(letter, anim, data) : advance;
284+
advance = (Math.isNaN(advance) && i >= data.startIndex) ? getAdvance(letter, anim, data) : advance;
285285

286286
if (anim == null || __renderData.alpha <= 0.0)
287287
continue;
@@ -551,7 +551,7 @@ class Alphabet extends FlxSprite {
551551
angle: angle,
552552
cos: angleCos,
553553
sin: angleSin,
554-
554+
555555
flipX: node.get("flipX") == "true",
556556
flipY: node.get("flipY") == "true",
557557

@@ -607,7 +607,7 @@ class Alphabet extends FlxSprite {
607607
angle: angle,
608608
cos: angleCos,
609609
sin: angleSin,
610-
610+
611611
flipX: xFlip,
612612
flipY: yFlip,
613613

@@ -630,7 +630,7 @@ class Alphabet extends FlxSprite {
630630
angle: angle,
631631
cos: angleCos,
632632
sin: angleSin,
633-
633+
634634
flipX: xFlip,
635635
flipY: yFlip,
636636

@@ -664,7 +664,7 @@ class Alphabet extends FlxSprite {
664664
var xScale:Float = Std.parseFloat(node.get("scaleX")).getDefaultFloat(1.0);
665665
var yScale:Float = Std.parseFloat(node.get("scaleY")).getDefaultFloat(1.0);
666666
var advance:Float = Std.parseFloat(node.get("advance"));
667-
667+
668668
var xFlip = node.get("flipX") == "true";
669669
var yFlip = node.get("flipY") == "true";
670670

@@ -685,7 +685,7 @@ class Alphabet extends FlxSprite {
685685
angle: angle,
686686
cos: angleCos,
687687
sin: angleSin,
688-
688+
689689
flipX: xFlip,
690690
flipY: yFlip,
691691

0 commit comments

Comments
 (0)