loop through all note style entries

This commit is contained in:
lemz 2024-06-02 02:58:56 +02:00 committed by EliteMasterEric
parent ca69e7b850
commit 9d7846a0d5

View file

@ -70,20 +70,26 @@ class ChartEditorNoteSprite extends FlxSprite
this.parentState = parent; this.parentState = parent;
var entries:Array<String> = NoteStyleRegistry.instance.listEntryIds();
if (noteFrameCollection == null) if (noteFrameCollection == null)
{ {
buildEmptyFrameCollection(); buildEmptyFrameCollection();
addNoteStyleFrames(fetchNoteStyle('funkin')); for (entry in entries)
addNoteStyleFrames(fetchNoteStyle('pixel')); {
addNoteStyleFrames(fetchNoteStyle(entry));
}
} }
if (noteFrameCollection == null) throw 'ERROR: Could not initialize note sprite animations.'; if (noteFrameCollection == null) throw 'ERROR: Could not initialize note sprite animations.';
this.frames = noteFrameCollection; this.frames = noteFrameCollection;
addNoteStyleAnimations(fetchNoteStyle('funkin')); for (entry in entries)
addNoteStyleAnimations(fetchNoteStyle('pixel')); {
addNoteStyleAnimations(fetchNoteStyle(entry));
}
} }
static var noteFrameCollection:Null<FlxFramesCollection> = null; static var noteFrameCollection:Null<FlxFramesCollection> = null;