mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-15 11:22:55 +00:00
add more options
This commit is contained in:
parent
0fe726cefa
commit
764cdee63d
|
@ -94,6 +94,16 @@ typedef NoteKindParamData =
|
||||||
*/
|
*/
|
||||||
?max:Null<Float>,
|
?max:Null<Float>,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If `step` is null, it will use 1.0
|
||||||
|
*/
|
||||||
|
?step:Null<Float>,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If `precision` is null, there will be 0 decimal places
|
||||||
|
*/
|
||||||
|
?precision:Null<Int>,
|
||||||
|
|
||||||
defaultValue:Dynamic
|
defaultValue:Dynamic
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,11 +83,11 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox
|
||||||
|
|
||||||
var paramStepper:NumberStepper = new NumberStepper();
|
var paramStepper:NumberStepper = new NumberStepper();
|
||||||
paramStepper.value = param.data.defaultValue;
|
paramStepper.value = param.data.defaultValue;
|
||||||
paramStepper.precision = 1;
|
|
||||||
paramStepper.step = 0.1;
|
|
||||||
paramStepper.percentWidth = 100;
|
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)
|
if (param.data.min != null)
|
||||||
{
|
{
|
||||||
paramStepper.min = param.data.min;
|
paramStepper.min = param.data.min;
|
||||||
|
@ -96,6 +96,10 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox
|
||||||
{
|
{
|
||||||
paramStepper.max = param.data.max;
|
paramStepper.max = param.data.max;
|
||||||
}
|
}
|
||||||
|
if (param.data.precision != null)
|
||||||
|
{
|
||||||
|
paramStepper.precision = param.data.precision;
|
||||||
|
}
|
||||||
|
|
||||||
addNoteKindParam(paramLabel, paramStepper);
|
addNoteKindParam(paramLabel, paramStepper);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue