display custom note style in chart editor

This commit is contained in:
lemz
2024-07-12 02:13:14 -04:00
committed by EliteMasterEric
parent 9d7846a0d5
commit ca2cbb44f5
5 changed files with 61 additions and 18 deletions
@@ -40,7 +40,8 @@ class ChartEditorNoteSprite extends FlxSprite
/**
* The name of the note style currently in use.
*/
public var noteStyle(get, never):String;
@:isVar
public var noteStyle(get, set):Null<String>;
public var overrideStepTime(default, set):Null<Float> = null;
@@ -189,19 +190,16 @@ class ChartEditorNoteSprite extends FlxSprite
}
}
function get_noteStyle():String
function get_noteStyle():Null<String>
{
if (this.parentState.currentCustomNoteKindStyle != null)
{
return this.parentState.currentCustomNoteKindStyle;
}
return this.noteStyle ?? this.parentState.currentSongNoteStyle;
}
if (NOTE_STYLES.contains(this.parentState.currentSongNoteStyle))
{
return this.parentState.currentSongNoteStyle;
}
return 'funkin';
function set_noteStyle(value:Null<String>):Null<String>
{
this.noteStyle = value;
this.playNoteAnimation();
return value;
}
@:nullSafety(Off)