Class ColorField
- Namespace
- UILib.Components
- Assembly
- UILib.dll
A component which stores a color that can be changed by the user through a color picker.
public class ColorField : Button
- Inheritance
-
ColorField
- Inherited Members
Constructors
ColorField(Color)
Initializes this color field.
public ColorField(Color color)
Parameters
colorColorThe default color
Properties
allowOpacity
Whether the opacity of this color field can be changed.
public bool allowOpacity { get; }
Property Value
onSubmit
Invokes listeners when the user has finished selecting a color.
public ValueEvent<Color> onSubmit { get; }
Property Value
- ValueEvent<Color>
onValueChanged
Invokes listeners when the color is changed.
public ValueEvent<Color> onValueChanged { get; }
Property Value
- ValueEvent<Color>
value
The current value of the color field.
public Color value { get; }
Property Value
- Color
Methods
AllowOpacity(bool)
Sets whether changing the opacity of the color is allowed. By default the opacity can be changed.
public void AllowOpacity(bool allowed)
Parameters
allowedboolWhether changing opacity is allowed
SetValue(Color)
Sets the color of this field.
public void SetValue(Color color)
Parameters
colorColorThe color to set