From d3c16b45c6d9f714d7324b4a58b4a7dad3fc9433 Mon Sep 17 00:00:00 2001 From: Lasercar <64717068+Lasercar@users.noreply.github.com> Date: Sun, 2 Mar 2025 14:24:22 +1000 Subject: [PATCH] Custom note kind field fix Now gets hidden if the note selected isn't a custom one --- .../charting/toolboxes/ChartEditorNoteDataToolbox.hx | 8 ++++++++ .../funkin/ui/debug/charting/util/ChartEditorDropdowns.hx | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx index 19339409a..7a0818f7e 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx @@ -139,6 +139,14 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox super.refresh(); toolboxNotesNoteKind.value = ChartEditorDropdowns.lookupNoteKind(chartEditorState.noteKindToPlace); + if (toolboxNotesNoteKind.value.id == '~CUSTOM~' && chartEditorState.noteKindToPlace != null) + { + showCustom(); + } + else + { + hideCustom(); + } toolboxNotesCustomKind.value = chartEditorState.noteKindToPlace; createNoteKindParams(chartEditorState.noteKindToPlace); diff --git a/source/funkin/ui/debug/charting/util/ChartEditorDropdowns.hx b/source/funkin/ui/debug/charting/util/ChartEditorDropdowns.hx index ce34db998..68c0c726b 100644 --- a/source/funkin/ui/debug/charting/util/ChartEditorDropdowns.hx +++ b/source/funkin/ui/debug/charting/util/ChartEditorDropdowns.hx @@ -256,7 +256,7 @@ class ChartEditorDropdowns public static function lookupNoteKind(noteKindId:Null):DropDownEntry { if (noteKindId == null) return lookupNoteKind(''); - if (!NOTE_KINDS.exists(noteKindId)) return {id: '~CUSTOM~', text: 'Custom'}; + if (noteKindId != '' && !NOTE_KINDS.exists(noteKindId)) return {id: '~CUSTOM~', text: 'Custom'}; return {id: noteKindId ?? '', text: NOTE_KINDS.get(noteKindId) ?? 'Unknown'}; }