Class IntegerField
Makes a text field for entering an integer.
Inheritance
IntegerField
Inherited Members
Namespace: UnityEditor.UIElements
Syntax
public class IntegerField : TextValueField<int>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable, INotifyValueChanged<int>, IMixedValueSupport, IValueField<int>
Constructors
IntegerField()
Constructor.
Declaration
public IntegerField()
IntegerField(Int32)
Constructor.
Declaration
public IntegerField(int maxLength)
Parameters
Type | Name | Description |
---|---|---|
Int32 | maxLength | Maximum number of characters the field can take. |
IntegerField(String, Int32)
Constructor.
Declaration
public IntegerField(string label, int maxLength = null)
Parameters
Type | Name | Description |
---|---|---|
String | label | |
Int32 | maxLength | Maximum number of characters the field can take. |
Fields
inputUssClassName
USS class name of input elements in elements of this type.
Declaration
public static readonly string inputUssClassName
Field Value
Type | Description |
---|---|
String |
labelUssClassName
USS class name of labels in elements of this type.
Declaration
public static readonly string labelUssClassName
Field Value
Type | Description |
---|---|
String |
ussClassName
USS class name of elements of this type.
Declaration
public static readonly string ussClassName
Field Value
Type | Description |
---|---|
String |
Methods
ApplyInputDeviceDelta(Vector3, DeltaSpeed, Int32)
Modify the value using a 3D delta and a speed, typically coming from an input device.
Declaration
public override void ApplyInputDeviceDelta(Vector3 delta, DeltaSpeed speed, int startValue)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | delta | A vector used to compute the value change. |
DeltaSpeed | speed | A multiplier for the value change. |
Int32 | startValue | The start value. |
Overrides
UnityEditor.UIElements.TextValueField<System.Int32>.ApplyInputDeviceDelta(Vector3, UnityEditor.UIElements.DeltaSpeed, System.Int32)
StringToValue(String)
Converts a string to an integer.
Declaration
protected override int StringToValue(string str)
Parameters
Type | Name | Description |
---|---|---|
String | str | The string to convert. |
Returns
Type | Description |
---|---|
Int32 | The integer parsed from the string. |
Overrides
UnityEngine.UIElements.TextInputBaseField<System.Int32>.StringToValue(System.String)
ValueToString(Int32)
Converts the given integer to a string.
Declaration
protected override string ValueToString(int v)
Parameters
Type | Name | Description |
---|---|---|
Int32 | v | The integer to be converted to string. |
Returns
Type | Description |
---|---|
String | The integer as string. |
Overrides
UnityEngine.UIElements.TextInputBaseField<System.Int32>.ValueToString(System.Int32)