26 lines
428 B
C#
26 lines
428 B
C#
using System;
|
|
|
|
namespace DebuggingEssentials
|
|
{
|
|
[Serializable]
|
|
public class IntInputField : BaseInputField
|
|
{
|
|
public int value;
|
|
|
|
public IntInputField(int value)
|
|
{
|
|
this.value = value;
|
|
text = value.ToString();
|
|
}
|
|
|
|
public override void TryParse(bool logError = true)
|
|
{
|
|
if (!(text == string.Empty))
|
|
{
|
|
Parser.ChangeType(typeof(int), text, out var result, logError);
|
|
value = (int)result;
|
|
}
|
|
}
|
|
}
|
|
}
|