diff --git a/source/funkin/play/notes/notekind/NoteKind.hx b/source/funkin/play/notes/notekind/NoteKind.hx index 7efa93de6..a06670503 100644 --- a/source/funkin/play/notes/notekind/NoteKind.hx +++ b/source/funkin/play/notes/notekind/NoteKind.hx @@ -94,6 +94,16 @@ typedef NoteKindParamData = */ ?max:Null, + /** + * If `step` is null, it will use 1.0 + */ + ?step:Null, + + /** + * If `precision` is null, there will be 0 decimal places + */ + ?precision:Null, + defaultValue:Dynamic } diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx index 751af5dff..26e495dcc 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx @@ -83,11 +83,11 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox var paramStepper:NumberStepper = new NumberStepper(); paramStepper.value = param.data.defaultValue; - paramStepper.precision = 1; - paramStepper.step = 0.1; paramStepper.percentWidth = 100; + paramStepper.step = param.data.step ?? 1; - // this check should be unnecessary but for some reason even when min or max is null it will set it to 0 + // this check should be unnecessary but for some reason + // even when these are null it will set it to 0 if (param.data.min != null) { paramStepper.min = param.data.min; @@ -96,6 +96,10 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox { paramStepper.max = param.data.max; } + if (param.data.precision != null) + { + paramStepper.precision = param.data.precision; + } addNoteKindParam(paramLabel, paramStepper); }