UnityEditor.GradientEditor.DrawSwatch C# (CSharp) Method

DrawSwatch() private method

private DrawSwatch ( Rect totalPos, Swatch s, bool upwards ) : void
totalPos UnityEngine.Rect
s Swatch
upwards bool
return void
        private void DrawSwatch(Rect totalPos, Swatch s, bool upwards)
        {
            Color backgroundColor = GUI.backgroundColor;
            Rect position = this.CalcSwatchRect(totalPos, s);
            GUI.backgroundColor = s.m_Value;
            GUIStyle style = !upwards ? s_Styles.downSwatch : s_Styles.upSwatch;
            GUIStyle style2 = !upwards ? s_Styles.downSwatchOverlay : s_Styles.upSwatchOverlay;
            style.Draw(position, false, false, this.m_SelectedSwatch == s, false);
            GUI.backgroundColor = backgroundColor;
            style2.Draw(position, false, false, this.m_SelectedSwatch == s, false);
        }