/// <summary> /// Call with a ColourWrapper object containing the colour to be changed, with an optional callback which is called when Apply or OK are clicked. /// Setting draggable = true will break sliders for now. /// </summary> /// <param name="colour"></param> /// <param name="callback"></param> public Dialog_ColourPicker( ColourWrapper colour, Action callback = null ) { // TODO: figure out if sliders and draggable = true can coexist. // using Event.current.Use() prevents further drawing of the tab and closes parent(s). _wrapper = colour; _callback = callback; Colour = _wrapper.Color; NotifyRGBUpdated(); }
public MainTabWindow_ColourPicker() { BGCol = new ColourWrapper(Color.grey); BGTex = SolidColorMaterials.NewSolidColorTexture( BGCol.Color ); }