Class TextValueField<TValueType>
Base class for text fields.
Inherited Members
Namespace: UnityEditor.UIElements
Syntax
public abstract class TextValueField<TValueType> : TextInputBaseField<TValueType>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable, INotifyValueChanged<TValueType>, IMixedValueSupport, IValueField<TValueType>
Type Parameters
Name | Description |
---|---|
TValueType |
Constructors
TextValueField(Int32, TextValueField<TValueType>.TextValueInput)
Declaration
protected TextValueField(int maxLength, TextValueField<TValueType>.TextValueInput textValueInput)
Parameters
Type | Name | Description |
---|---|---|
Int32 | maxLength | |
TextValueField.TextValueInput<> | textValueInput |
TextValueField(String, Int32, TextValueField<TValueType>.TextValueInput)
Declaration
protected TextValueField(string label, int maxLength, TextValueField<TValueType>.TextValueInput textValueInput)
Parameters
Type | Name | Description |
---|---|---|
String | label | |
Int32 | maxLength | |
TextValueField.TextValueInput<> | textValueInput |
Properties
formatString
The format string for the value.
Declaration
public string formatString { get; set; }
Property Value
Type | Description |
---|---|
String |
value
This is the value of the field.
Declaration
public override TValueType value { get; set; }
Property Value
Type | Description |
---|---|
TValueType |
Overrides
UnityEngine.UIElements.BaseField<TValueType>.value
Implements
Methods
AddLabelDragger<TDraggerType>()
Method used to add a mouse dragger on the label for specific numeric fields.
Declaration
protected void AddLabelDragger<TDraggerType>()
Type Parameters
Name | Description |
---|---|
TDraggerType |
ApplyInputDeviceDelta(Vector3, DeltaSpeed, TValueType)
Modify the value using a 3D delta and a speed, typically coming from an input device.
Declaration
public abstract void ApplyInputDeviceDelta(Vector3 delta, DeltaSpeed speed, TValueType startValue)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | delta | A vector used to compute the value change. |
DeltaSpeed | speed | A multiplier for the value change. |
TValueType | startValue | The start value. |
Implements
SetValueWithoutNotify(TValueType)
Allow to set the value without being notified.
Declaration
public override void SetValueWithoutNotify(TValueType newValue)
Parameters
Type | Name | Description |
---|---|---|
TValueType | newValue | The new value to set. |
Overrides
UnityEngine.UIElements.BaseField<TValueType>.SetValueWithoutNotify(TValueType)
StartDragging()
Indicates the user started the mouse dragging for text selection.
Declaration
public void StartDragging()
Implements
StopDragging()
Indicates the user stopped the mouse dragging for text selection.
Declaration
public void StopDragging()