Editor: Starting BPM can be entered via input field as well as through the BPM change tool.

This commit is contained in:
Jenny Crowe
2022-02-22 01:16:10 -07:00
parent 12c70d4311
commit 19a76babd2
5 changed files with 1105 additions and 277 deletions

View File

@ -71,12 +71,13 @@ namespace RhythmHeavenMania.Editor
slider.maxValue = fl.max;
slider.value = System.Convert.ToSingle(parameterManager.entity[propertyName]);
inputField.text = slider.value.ToString("G4"); // G4 = Display no more than 4 decimal places.
inputField.text = slider.value.ToString("G");
slider.onValueChanged.AddListener(delegate
{
inputField.text = slider.value.ToString("G4");
parameterManager.entity[propertyName] = (float)System.Math.Round(slider.value, 4);
var newValue = (float)System.Math.Round(slider.value, 4);
inputField.text = newValue.ToString("G");
parameterManager.entity[propertyName] = newValue;
});
inputField.onEndEdit.AddListener(delegate