コード例 #1
0
        /// <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();
        }
コード例 #2
0
 public MainTabWindow_ColourPicker()
 {
     BGCol = new ColourWrapper(Color.grey);
     BGTex = SolidColorMaterials.NewSolidColorTexture( BGCol.Color );
 }