mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-05-23 02:58:20 -04:00
change note style on change
This commit is contained in:
parent
ca2cbb44f5
commit
040fc85a62
2 changed files with 27 additions and 1 deletions
source/funkin/ui/debug/charting
|
@ -63,7 +63,7 @@ class ChartEditorHoldNoteSprite extends SustainTrail
|
||||||
function updateHoldNoteGraphic():Void
|
function updateHoldNoteGraphic():Void
|
||||||
{
|
{
|
||||||
var bruhStyle:NoteStyle = NoteStyleRegistry.instance.fetchEntry(noteStyle);
|
var bruhStyle:NoteStyle = NoteStyleRegistry.instance.fetchEntry(noteStyle);
|
||||||
this.setupHoldNoteGraphic(bruhStyle);
|
setupHoldNoteGraphic(bruhStyle);
|
||||||
|
|
||||||
zoom = 1.0;
|
zoom = 1.0;
|
||||||
zoom *= bruhStyle.fetchHoldNoteScale();
|
zoom *= bruhStyle.fetchHoldNoteScale();
|
||||||
|
|
|
@ -4,6 +4,8 @@ import haxe.ui.components.DropDown;
|
||||||
import haxe.ui.components.TextField;
|
import haxe.ui.components.TextField;
|
||||||
import haxe.ui.events.UIEvent;
|
import haxe.ui.events.UIEvent;
|
||||||
import funkin.ui.debug.charting.util.ChartEditorDropdowns;
|
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.notestyle.NoteStyle;
|
||||||
import funkin.play.notes.notekind.NoteKindManager;
|
import funkin.play.notes.notekind.NoteKindManager;
|
||||||
|
|
||||||
|
@ -59,8 +61,32 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox
|
||||||
if (!_initializing && chartEditorState.currentNoteSelection.length > 0)
|
if (!_initializing && chartEditorState.currentNoteSelection.length > 0)
|
||||||
{
|
{
|
||||||
// Edit the note data of any selected notes.
|
// 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)
|
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;
|
note.kind = chartEditorState.noteKindToPlace;
|
||||||
}
|
}
|
||||||
chartEditorState.saveDataDirty = true;
|
chartEditorState.saveDataDirty = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue