23 lines
814 B
C#
23 lines
814 B
C#
|
using UnityEngine.UIElements;
|
|||
|
|
|||
|
public class DemoOklchColourPicker : OklchColourPickerUI
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// initialise the ui elements and register change event callbacks functions
|
|||
|
/// </summary>
|
|||
|
public new void OnEnable()
|
|||
|
{
|
|||
|
var ui = GetComponent<UIDocument>().rootVisualElement;
|
|||
|
|
|||
|
LightnessSlider = ui.Q<Slider>("DemoResponseLightnessSlider");
|
|||
|
LightnessSlider.RegisterCallback<ChangeEvent<float>>(OnLightnessChange);
|
|||
|
|
|||
|
ChromaSlider = ui.Q<Slider>("DemoResponseChromaSlider");
|
|||
|
ChromaSlider.RegisterCallback<ChangeEvent<float>>(OnChromaChange);
|
|||
|
|
|||
|
HueSlider = ui.Q<Slider>("DemoResponseHueSlider");
|
|||
|
HueSlider.RegisterCallback<ChangeEvent<float>>(OnHueChange);
|
|||
|
|
|||
|
ResponseColour = ui.Q<VisualElement>("DemoResponseColour");
|
|||
|
}
|
|||
|
}
|