mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-27 07:17:20 +00:00
change note style on change
This commit is contained in:
parent
ca2cbb44f5
commit
040fc85a62
|
@ -63,7 +63,7 @@ class ChartEditorHoldNoteSprite extends SustainTrail
|
|||
function updateHoldNoteGraphic():Void
|
||||
{
|
||||
var bruhStyle:NoteStyle = NoteStyleRegistry.instance.fetchEntry(noteStyle);
|
||||
this.setupHoldNoteGraphic(bruhStyle);
|
||||
setupHoldNoteGraphic(bruhStyle);
|
||||
|
||||
zoom = 1.0;
|
||||
zoom *= bruhStyle.fetchHoldNoteScale();
|
||||
|
|
|
@ -4,6 +4,8 @@ import haxe.ui.components.DropDown;
|
|||
import haxe.ui.components.TextField;
|
||||
import haxe.ui.events.UIEvent;
|
||||
import funkin.ui.debug.charting.util.ChartEditorDropdowns;
|
||||
import funkin.ui.debug.charting.components.ChartEditorNoteSprite;
|
||||
import funkin.ui.debug.charting.components.ChartEditorHoldNoteSprite;
|
||||
import funkin.play.notes.notestyle.NoteStyle;
|
||||
import funkin.play.notes.notekind.NoteKindManager;
|
||||
|
||||
|
@ -59,8 +61,32 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox
|
|||
if (!_initializing && chartEditorState.currentNoteSelection.length > 0)
|
||||
{
|
||||
// Edit the note data of any selected notes.
|
||||
var noteSprites:Array<ChartEditorNoteSprite> = chartEditorState.renderedNotes.members.copy();
|
||||
var holdNoteSprites:Array<ChartEditorHoldNoteSprite> = chartEditorState.renderedHoldNotes.members.copy();
|
||||
for (note in chartEditorState.currentNoteSelection)
|
||||
{
|
||||
// update note sprites
|
||||
for (noteSprite in noteSprites)
|
||||
{
|
||||
if (noteSprite.noteData == note)
|
||||
{
|
||||
noteSprite.noteStyle = NoteKindManager.getNoteStyleId(chartEditorState.noteKindToPlace) ?? chartEditorState.currentSongNoteStyle;
|
||||
noteSprites.remove(noteSprite);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// update hold note sprites
|
||||
for (holdNoteSprite in holdNoteSprites)
|
||||
{
|
||||
if (holdNoteSprite.noteData == note)
|
||||
{
|
||||
holdNoteSprite.noteStyle = NoteKindManager.getNoteStyleId(chartEditorState.noteKindToPlace) ?? chartEditorState.currentSongNoteStyle;
|
||||
holdNoteSprites.remove(holdNoteSprite);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
note.kind = chartEditorState.noteKindToPlace;
|
||||
}
|
||||
chartEditorState.saveDataDirty = true;
|
||||
|
|
Loading…
Reference in a new issue