Example #1
0
 void DrawSliderMode()
 {
     using (new GUILayout.HorizontalScope())
     {
         GUILayout.FlexibleSpace();
         var style = new GUIStyle("button");
         style.fontSize = 12;
         if (GUILayout.Button(sliderMode.ToString(), style, GUILayout.Width(50f)))
         {
             sliderMode = (SliderMode)(((int)sliderMode + 1) % Enum.GetValues(typeof(SliderMode)).Length);
         }
     }
 }
Example #2
0
        /// <summary>
        /// Triggered when the user selects a new mode for the side slider, changing the gamut of colors displayed in the
        /// slider.
        /// </summary>
        void OnSliderModeChanged()
        {
            int maxModes = Enum.GetNames(sliderMode.GetType()).Length;

            sliderMode = (SliderMode)(((int)sliderMode + 1) % maxModes);

            UpdateSliderMode();

            guiColorModeBtn.SetContent(sliderMode.ToString());
            UpdateInputBoxValues();
            Update1DSliderTextures();
            Update1DSliderValues();
        }
Example #3
0
        /// <summary>
        /// Triggered when the user selects a new mode for the side slider, changing the gamut of colors displayed in the 
        /// slider.
        /// </summary>
        void OnSliderModeChanged()
        {
            int maxModes = Enum.GetNames(sliderMode.GetType()).Length;
            sliderMode = (SliderMode)(((int)sliderMode + 1) % maxModes);

            UpdateSliderMode();

            guiColorModeBtn.SetContent(sliderMode.ToString());
            UpdateInputBoxValues();
            Update1DSliderTextures();
            Update1DSliderValues();
        }