UnityEditor.ColorPicker.TonemappingControls C# (CSharp) Method

TonemappingControls() private method

private TonemappingControls ( ) : void
return void
        private void TonemappingControls()
        {
            bool flag = false;
            EditorGUI.BeginChangeCheck();
            this.m_UseTonemappingPreview = GUILayout.Toggle(this.m_UseTonemappingPreview, styles.tonemappingToggle, styles.toggle, new GUILayoutOption[0]);
            if (EditorGUI.EndChangeCheck())
            {
                flag = true;
            }
            if (this.m_UseTonemappingPreview)
            {
                EditorGUI.indentLevel++;
                EditorGUI.BeginChangeCheck();
                float power = (QualitySettings.activeColorSpace != ColorSpace.Linear) ? 2f : 1f;
                this.m_HDRValues.m_ExposureAdjustment = EditorGUILayout.PowerSlider(string.Empty, this.m_HDRValues.m_ExposureAdjustment, this.m_HDRConfig.minExposureValue, this.m_HDRConfig.maxExposureValue, power, new GUILayoutOption[0]);
                if (Event.current.type == EventType.Repaint)
                {
                    GUI.Label(EditorGUILayout.s_LastRect, GUIContent.Temp(string.Empty, "Exposure value"));
                }
                if (EditorGUI.EndChangeCheck())
                {
                    flag = true;
                }
                Rect position = EditorGUILayout.GetControlRect(true, 16f, EditorStyles.numberField, new GUILayoutOption[0]);
                EditorGUI.LabelField(position, GUIContent.Temp("Tonemapped Color"));
                Rect rect2 = new Rect(position.xMax - this.fieldWidth, position.y, this.fieldWidth, position.height);
                EditorGUIUtility.DrawColorSwatch(rect2, DoTonemapping(color, this.m_HDRValues.m_ExposureAdjustment), false, false);
                GUI.Label(rect2, GUIContent.none, styles.colorPickerBox);
                EditorGUI.indentLevel--;
            }
            if (flag)
            {
                this.m_RGBHSVSlidersDirty = true;
                this.m_ColorSpaceBoxDirty = true;
                this.m_ColorSliderDirty = true;
            }
        }