@@ -43,24 +43,8 @@ class CharterStrumline extends UISprite {
4343
4444 if (strumLine .visible == null ) strumLine .visible = true ;
4545
46- var icons = strumLine .characters != null ? strumLine .characters : [];
47-
4846 healthIcons = new FlxSpriteGroup (x , y );
4947
50- var maxCol = icons .length < 4 ? icons .length : 4 ;
51- var maxRow = Math .floor ((icons .length - 1 ) / 4 ) + 1 ;
52- for (i => icon in icons ) {
53- var healthIcon = new HealthIcon (Character .getIconFromCharName (icon ));
54- var newScale = Math .max ((0.6 - (icons .length / 20 )), 0.35 );
55- healthIcon .scale .x = healthIcon .scale .y = healthIcon .defaultScale * newScale ;
56- healthIcon .updateHitbox ();
57-
58- healthIcon .x = FlxMath .lerp (0 , Math .min (icons .length * 20 , 120 ), (maxCol - 1 != 0 ? (i % 4 ) / (maxCol - 1 ) : 0 ));
59- healthIcon .y = (draggable ? 29 : 7 ) + FlxMath .lerp (0 , Math .min (maxRow * 15 , 60 ), (maxRow - 1 != 0 ? Math .floor (i / 4 ) / (maxRow - 1 ) : 0 ));
60- healthIcon .alpha = strumLine .visible ? 1 : 0.4 ;
61- healthIcons .add (healthIcon );
62- }
63-
6448 members .push (healthIcons );
6549
6650 draggingSprite = new UISprite ();
@@ -74,8 +58,7 @@ class CharterStrumline extends UISprite {
7458 button = new CharterStrumlineOptions (this );
7559 members .push (button );
7660
77- vocals = strumLine .vocalsSuffix .length > 0 ? FlxG .sound .load (Paths .voices (PlayState .SONG .meta .name , PlayState .difficulty , strumLine .vocalsSuffix )) : new FlxSound ();
78- vocals .group = FlxG .sound .defaultMusicGroup ;
61+ updateInfo ();
7962
8063 selectedWaveform = - 1 ;
8164 }
@@ -113,7 +96,8 @@ class CharterStrumline extends UISprite {
11396 for (i => icon in icons ) {
11497 var healthIcon = new HealthIcon (Character .getIconFromCharName (icon ));
11598 var newScale = Math .max ((0.6 - (icons .length / 20 )), 0.35 );
116- healthIcon .scale .x = healthIcon .scale .y = healthIcon .defaultScale * newScale ;
99+ var size = Std .int (150 * newScale );
100+ healthIcon .setUnstretchedGraphicSize (size , size , true );
117101 healthIcon .updateHitbox ();
118102
119103 healthIcon .x = FlxMath .lerp (0 , Math .min (icons .length * 20 , 120 ), (maxCol - 1 != 0 ? (i % 4 ) / (maxCol - 1 ) : 0 ));
0 commit comments