@@ -1114,6 +1114,7 @@ class Charter extends UIState {
11141114 if (n .hovered || n .sustainDraggable ) {
11151115 deletedNotes .push (n );
11161116 deleteSingleSelection (n , false );
1117+ UIState .playEditorSound (Flags .DEFAULT_CHARTER_NOTEDELETE_SOUND );
11171118
11181119 if (selection .contains (n )) selection .remove (n );
11191120 noteDeleteAnims .deleteNotes .push ({
@@ -1188,7 +1189,6 @@ class Charter extends UIState {
11881189 if (selected == null ) return selected ;
11891190
11901191 if (selected is CharterNote ) {
1191- UIState .playEditorSound (Flags .DEFAULT_CHARTER_NOTEDELETE_SOUND );
11921192 var note : CharterNote = cast selected ;
11931193 note .strumLineID = strumLines .members .indexOf (note .strumLine );
11941194 note .strumLine = null ; // For static undos :D
@@ -1243,6 +1243,7 @@ class Charter extends UIState {
12431243 else member ++ ;
12441244 }
12451245 }
1246+ UIState .playEditorSound (Flags .DEFAULT_CHARTER_NOTEDELETE_SOUND );
12461247 notesGroup .sortNotes ();
12471248 notesGroup .autoSort = true ;
12481249
@@ -1340,7 +1341,7 @@ class Charter extends UIState {
13401341 FlxG .state .openSubState (new CharterStrumlineScreen (strumLines .members .length , null , (_ ) -> {
13411342 if (_ != null ) {
13421343 createStrumline (strumLines .members .length , _ );
1343-
1344+ strumlineAddButton . button . setColorTransform ( 1 , 1 , 1 , strumlineAddButton . button . alpha );
13441345 strumlineAddButton .textTweenColor .color = 0xFF00FF00 ;
13451346 strumlineAddButton .pressAnimation (true );
13461347 }
@@ -1443,7 +1444,8 @@ class Charter extends UIState {
14431444 noteTypeText .x = noteTopButton .x + noteTopButton .bWidth + 6 ;
14441445 noteTypeText .y = Std .int ((noteTopButton .bHeight - noteTypeText .height ) / 2 );
14451446 }
1446- noteTypeText .text = ' ( $noteType ) ' + (noteTypes [noteType - 1 ] == null ? translate (" noteTypes.default" ) : noteTypes [noteType - 1 ]);
1447+ var targetNoteText = ' ( $noteType ) ' + (noteTypes [noteType - 1 ] == null ? translate (" noteTypes.default" ) : noteTypes [noteType - 1 ]);
1448+ if (noteTypeText .text != targetNoteText ) noteTypeText .text = targetNoteText ;
14471449
14481450 super .update (elapsed );
14491451
@@ -1486,22 +1488,30 @@ class Charter extends UIState {
14861488 }
14871489
14881490 var curChange = Conductor .curChange ;
1489- songPosInfo .text = [
1490- // no need to translate the time text since it has no text only numbers
1491- ' ${CoolUtil .timeToStr (Conductor .songPosition )} / ${CoolUtil .timeToStr (songLength )}' ,
1492- SONGPOSINFO_STEP .format ([curStep ]),
1493- SONGPOSINFO_BEAT .format ([curBeat ]),
1494- SONGPOSINFO_MEASURE .format ([curMeasure ]),
1495- SONGPOSINFO_BPM .format ([(curChange != null && curChange .continuous && curChange .endSongTime > songPos ) ? FlxMath .roundDecimal (Conductor .bpm , 3 ) : Conductor .bpm ]),
1496- SONGPOSINFO_TIMESIGNATURE .format ([Conductor .beatsPerMeasure , Conductor .denominator ])
1497- ].join (" \n " );
1491+ var targetText = ' ${CoolUtil .timeToStr (Conductor .songPosition )} / ${CoolUtil .timeToStr (songLength )}'
1492+ + ' \n ' + SONGPOSINFO_STEP .format ([curStep ])
1493+ + ' \n ' + SONGPOSINFO_BEAT .format ([curBeat ])
1494+ + ' \n ' + SONGPOSINFO_MEASURE .format ([curMeasure ])
1495+ + ' \n ' + SONGPOSINFO_BPM .format ([(curChange != null && curChange .continuous && curChange .endSongTime > songPos ) ? FlxMath .roundDecimal (Conductor .bpm , 3 ) : Conductor .bpm ])
1496+ + ' \n ' + SONGPOSINFO_TIMESIGNATURE .format ([Conductor .beatsPerMeasure , Conductor .denominator ]);
1497+
1498+ if (songPosInfo .text != targetText ) songPosInfo .text = targetText ;
14981499
14991500 if (charterCamera .zoom != (charterCamera .zoom = lerp (charterCamera .zoom , __camZoom , __firstFrame ? 1 : 0.125 )))
15001501 updateDisplaySprites ();
15011502
15021503 if (strumLines != null )
15031504 strumlineLockButton .button .animation .play (strumLines .draggable ? " 1" : " 0" , true );
15041505
1506+ if (strumLines .members .length <= 0 ) {
1507+ final glow = (Math .sin (FlxG .game .ticks * 0.004 ) + 1 ) * 0.5 ;
1508+ strumlineAddButton .button .setColorTransform (
1509+ 1 - (glow * 0.5 ), 1 - (glow * 0.5 ), 1 - (glow * 0.5 ),
1510+ strumlineAddButton .button .alpha ,
1511+ Std .int (glow * 255 ), Std .int (glow * 255 ), Std .int (glow * 255 ), 0
1512+ );
1513+ }
1514+
15051515 WindowUtils .prefix = undos .unsaved ? Flags .UNDO_PREFIX : " " ;
15061516 SaveWarning .showWarning = undos .unsaved ;
15071517
@@ -1740,6 +1750,7 @@ class Charter extends UIState {
17401750 if (selection == null || selection .length == 0 ) return ;
17411751 selection .loop ((n : CharterNote ) -> {
17421752 noteDeleteAnims .deleteNotes .push ({note : n , time : noteDeleteAnims .deleteTime });
1753+ @:privateAccess CharterNote .callScriptOnNote (' onCharterNoteDelete' , n );
17431754 });
17441755 selection = deleteSelection (selection , true );
17451756 }
@@ -1754,6 +1765,7 @@ class Charter extends UIState {
17541765 if (oldNote != null && oldNote .step == note .step && oldNote .strumLineID == note .strumLineID && oldNote .id == note .id ) {
17551766 noteDeleteAnims .deleteNotes .push ({note : oldNote , time : noteDeleteAnims .deleteTime });
17561767 toDelete .push (oldNote );
1768+ @:privateAccess CharterNote .callScriptOnNote (' onCharterNoteDelete' , oldNote );
17571769 }
17581770 oldNote = note ;
17591771 }
0 commit comments