Files
2026-03-04 09:37:33 +08:00

37 lines
594 B
C#

using System;
namespace DebuggingEssentials
{
[Serializable]
public class FloatInputField : BaseInputField
{
public float value;
public FloatInputField(float value)
{
this.value = value;
text = value.ToString();
}
public override void TryParse(bool logError = true)
{
Parser.ChangeType(typeof(float), text, out var result, logError);
if (result != null)
{
value = (float)result;
}
}
public void SetValueText(float value)
{
this.value = value;
text = value.ToString();
}
public void UpdateText()
{
text = value.ToString();
}
}
}