using System;
using bs;
namespace bs.Editor
{
partial class GUIColorGradientField
{
///
/// Triggered when the gradient in the field changes.
///
public event Action OnChanged;
///
/// Callback triggered when the user clicks on the GUI element.
///
partial void OnClicked()
{
GradientPicker.Show(Value, (success, colorGradient) =>
{
if (!success)
return;
Value = colorGradient;
OnChanged?.Invoke(colorGradient);
});
}
}
}