Пример #1
0
        public override void DrawPane()
        {
            var defaultBG = GUI.backgroundColor;

            GUI.backgroundColor = ColorRegistry.SubPaneColor;                                            // change color
            EditorGUILayout.BeginVertical(CustomUI.SubLeftPaneBoxStyle, CustomUI.SubLeftPaneBoxOptions); // begin box
            {
                GUI.backgroundColor = defaultBG;                                                         // reset color

                EditorGUILayout.LabelField(TitleContent, CustomUI.LeftPaneTitleLabelStyle, CustomUI.LeftSubPaneTitleLabelOptions);

                EditorGUI.BeginChangeCheck();
                CustomUI.DrawLeftPaneIntSlider(SliderLabelContent, ref m_ShiftHue, MinHue, MaxHue);
                bool changed = EditorGUI.EndChangeCheck();
                if (changed)
                {
                    OnChangeHue();
                }

                EditorGUILayout.BeginHorizontal();
                /// draw buttons
                if (GUILayout.Button(ConfirmButtonContent, CustomUI.SubLeftPaneButtonStyle, CustomUI.SubLeftPaneButtonOptions))
                {
                    m_ShiftHue = 0;
                    GradientUtility.Copy(m_OutputGradient, m_Gradient);  // 現在の出力Gradientをソースにする
                    OnChangeHue();
                }
                if (GUILayout.Button(CancelButtonContent, CustomUI.SubLeftPaneButtonStyle, CustomUI.SubLeftPaneButtonOptions))
                {
                    m_ShiftHue = 0;
                    OnChangeHue();
                }
                EditorGUILayout.EndHorizontal();
            }
            EditorGUILayout.EndVertical();
            GUI.backgroundColor = defaultBG;
        }