Class MaskField
Make a field for masks.
Inheritance
Inherited Members
Namespace: UnityEditor.UIElements
Syntax
public class MaskField : BaseMaskField<int>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable, INotifyValueChanged<int>, IMixedValueSupport
Constructors
MaskField()
Initializes and returns an instance of MaskField.
Declaration
public MaskField()
MaskField(List<String>, Int32, Func<String, String>, Func<String, String>)
Initializes and returns an instance of MaskField.
Declaration
public MaskField(List<string> choices, int defaultMask, Func<string, string> formatSelectedValueCallback = null, Func<string, string> formatListItemCallback = null)
Parameters
Type | Name | Description |
---|---|---|
List<String> | choices | A list of choices to populate the field. |
Int32 | defaultMask | |
Func<String, String> | formatSelectedValueCallback | A callback to format the selected value. Unity calls this method automatically when a new value is selected in the field.. |
Func<String, String> | formatListItemCallback | The initial mask value this field should use. Unity calls this method automatically when displaying choices for the field. |
MaskField(String)
Initializes and returns an instance of MaskField.
Declaration
public MaskField(string label)
Parameters
Type | Name | Description |
---|---|---|
String | label | The text to use as a label for the field. |
MaskField(String, List<String>, Int32, Func<String, String>, Func<String, String>)
Initializes and returns an instance of MaskField.
Declaration
public MaskField(string label, List<string> choices, int defaultMask, Func<string, string> formatSelectedValueCallback = null, Func<string, string> formatListItemCallback = null)
Parameters
Type | Name | Description |
---|---|---|
String | label | The text to use as a label for the field. |
List<String> | choices | A list of choices to populate the field. |
Int32 | defaultMask | |
Func<String, String> | formatSelectedValueCallback | A callback to format the selected value. Unity calls this method automatically when a new value is selected in the field.. |
Func<String, String> | formatListItemCallback | The initial mask value this field should use. Unity calls this method automatically when displaying choices for the field. |
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 |
Properties
formatListItemCallback
Callback that provides a string representation used to populate the popup menu.
Declaration
public virtual Func<string, string> formatListItemCallback { get; set; }
Property Value
Type | Description |
---|---|
Func<String, String> |
formatSelectedValueCallback
Callback that provides a string representation used to display the selected value.
Declaration
public virtual Func<string, string> formatSelectedValueCallback { get; set; }
Property Value
Type | Description |
---|---|
Func<String, String> |