/// <summary>
        /// Triggered when the user updates the color gradient.
        /// </summary>
        /// <param name="newValue">New value of the gradient field.</param>
        private void OnFieldValueChanged(ColorGradientHDR newValue)
        {
            StartUndo();

            property.SetValue(newValue);
            state = InspectableState.Modified;

            EndUndo();
        }
Esempio n. 2
0
        /// <summary>
        /// Callback triggered when the user clicks on the GUI element.
        /// </summary>
        partial void Callback_OnClicked()
        {
            // Note: Should allow HDR color gradient
            ColorGradient gradient = new ColorGradient(Gradient.GetKeys());

            GradientPicker.Show(gradient, (success, colorGradient) =>
            {
                if (!success)
                {
                    return;
                }

                Gradient = new ColorGradientHDR(colorGradient.GetKeys());
            });
        }
Esempio n. 3
0
 private static extern void Internal_setValue(IntPtr thisPtr, ColorGradientHDR value);
Esempio n. 4
0
 private static extern void Internal_setGradient(IntPtr thisPtr, ColorGradientHDR colorGradient);