예제 #1
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            InitProperty(prop);
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_PieModuleToggle, "Pie");
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_PieModuleToggle)
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Name);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_InsideRadius);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_OutsideRadius);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_TooltipExtraRadius);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Rose);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Space);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Left);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Right);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Top);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Bottom);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;

                --EditorGUI.indentLevel;
            }
        }
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show               = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_Position         = prop.FindPropertyRelative("m_Position");
            SerializedProperty m_Distance         = prop.FindPropertyRelative("m_Distance");
            SerializedProperty m_Rotate           = prop.FindPropertyRelative("m_Rotate");
            SerializedProperty m_PaddingLeftRight = prop.FindPropertyRelative("m_PaddingLeftRight");
            SerializedProperty m_PaddingTopBottom = prop.FindPropertyRelative("m_PaddingTopBottom");
            SerializedProperty m_Color            = prop.FindPropertyRelative("m_Color");
            SerializedProperty m_BackgroundColor  = prop.FindPropertyRelative("m_BackgroundColor");
            SerializedProperty m_BackgroundWidth  = prop.FindPropertyRelative("m_BackgroundWidth");
            SerializedProperty m_BackgroundHeight = prop.FindPropertyRelative("m_BackgroundHeight");
            SerializedProperty m_FontSize         = prop.FindPropertyRelative("m_FontSize");
            SerializedProperty m_FontStyle        = prop.FindPropertyRelative("m_FontStyle");
            SerializedProperty m_Line             = prop.FindPropertyRelative("m_Line");
            SerializedProperty m_LineWidth        = prop.FindPropertyRelative("m_LineWidth");
            SerializedProperty m_LineLength1      = prop.FindPropertyRelative("m_LineLength1");
            SerializedProperty m_LineLength2      = prop.FindPropertyRelative("m_LineLength2");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SerieLabelToggle, prop, null, show, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (ChartEditorHelper.IsToggle(m_SerieLabelToggle, prop))
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Position);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Distance);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Color);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BackgroundColor);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BackgroundWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BackgroundHeight);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Rotate);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_PaddingLeftRight);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_PaddingTopBottom);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FontSize);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FontStyle);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Line);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_LineWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_LineLength1);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_LineLength2);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #3
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty m_Show   = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_Layer  = prop.FindPropertyRelative("m_Layer");
            SerializedProperty m_Sprite = prop.FindPropertyRelative("m_Sprite");
            SerializedProperty m_Color  = prop.FindPropertyRelative("m_Color");
            SerializedProperty m_Width  = prop.FindPropertyRelative("m_Width");
            SerializedProperty m_Height = prop.FindPropertyRelative("m_Height");
            SerializedProperty m_Offset = prop.FindPropertyRelative("m_Offset");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_IconStyleToggle, prop, null, m_Show, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (ChartEditorHelper.IsToggle(m_IconStyleToggle, prop))
            {
                ++EditorGUI.indentLevel;

                EditorGUI.PropertyField(drawRect, m_Layer);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Sprite);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Color);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Width);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Height);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Offset);
                drawRect.y += EditorGUI.GetPropertyHeight(m_Offset);
                --EditorGUI.indentLevel;
            }
        }
예제 #4
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show       = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_Position = prop.FindPropertyRelative("m_Position");
            SerializedProperty m_Width    = prop.FindPropertyRelative("m_Width");
            SerializedProperty m_Height   = prop.FindPropertyRelative("m_Height");
            SerializedProperty m_Offset   = prop.FindPropertyRelative("m_Offset");
            SerializedProperty m_Dent     = prop.FindPropertyRelative("m_Dent");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_LineArrowToggle, prop, "Line Arrow", show, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (ChartEditorHelper.IsToggle(m_LineArrowToggle, prop))
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Position);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Width);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Height);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Offset);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Dent);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #5
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show          = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_Color       = prop.FindPropertyRelative("m_Color");
            SerializedProperty m_BorderType  = prop.FindPropertyRelative("m_BorderType");
            SerializedProperty m_BorderWidth = prop.FindPropertyRelative("m_BorderWidth");
            SerializedProperty m_BorderColor = prop.FindPropertyRelative("m_BorderColor");
            SerializedProperty m_Opacity     = prop.FindPropertyRelative("m_Opacity");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_ItemStyleToggle, prop, "Item Style", show, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (ChartEditorHelper.IsToggle(m_ItemStyleToggle, prop))
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Color);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BorderType);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BorderWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BorderColor);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Opacity);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #6
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show                       = prop.FindPropertyRelative("m_Show");
            SerializedProperty type                       = prop.FindPropertyRelative("m_Type");
            SerializedProperty m_Formatter                = prop.FindPropertyRelative("m_Formatter");
            SerializedProperty m_TitleFormatter           = prop.FindPropertyRelative("m_TitleFormatter");
            SerializedProperty m_ItemFormatter            = prop.FindPropertyRelative("m_ItemFormatter");
            SerializedProperty m_FixedWidth               = prop.FindPropertyRelative("m_FixedWidth");
            SerializedProperty m_FixedHeight              = prop.FindPropertyRelative("m_FixedHeight");
            SerializedProperty m_MinWidth                 = prop.FindPropertyRelative("m_MinWidth");
            SerializedProperty m_MinHeight                = prop.FindPropertyRelative("m_MinHeight");
            SerializedProperty m_ForceENotation           = prop.FindPropertyRelative("m_ForceENotation");
            SerializedProperty m_PaddingLeftRight         = prop.FindPropertyRelative("m_PaddingLeftRight");
            SerializedProperty m_PaddingTopBottom         = prop.FindPropertyRelative("m_PaddingTopBottom");
            SerializedProperty m_BackgroundImage          = prop.FindPropertyRelative("m_BackgroundImage");
            SerializedProperty m_IgnoreDataDefaultContent = prop.FindPropertyRelative("m_IgnoreDataDefaultContent");
            SerializedProperty m_LineStyle                = prop.FindPropertyRelative("m_LineStyle");
            SerializedProperty m_TextStyle                = prop.FindPropertyRelative("m_TextStyle");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_TooltipModuleToggle, "Tooltip", show);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_TooltipModuleToggle)
            {
                EditorGUI.indentLevel++;
                EditorGUI.PropertyField(drawRect, type);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Formatter);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_TitleFormatter);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_ItemFormatter);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FixedWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FixedHeight);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_MinWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_MinHeight);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_PaddingLeftRight);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_PaddingTopBottom);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BackgroundImage);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_ForceENotation);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_IgnoreDataDefaultContent);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_LineStyle);
                drawRect.y += EditorGUI.GetPropertyHeight(m_LineStyle);
                EditorGUI.PropertyField(drawRect, m_TextStyle);
                drawRect.y += EditorGUI.GetPropertyHeight(m_TextStyle);
                EditorGUI.indentLevel--;
            }
        }
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show                 = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_Width              = prop.FindPropertyRelative("m_Width");
            SerializedProperty m_Opacity            = prop.FindPropertyRelative("m_Opacity");
            SerializedProperty m_BarBackgroundColor = prop.FindPropertyRelative("m_BarBackgroundColor");
            SerializedProperty m_BarColor           = prop.FindPropertyRelative("m_BarColor");
            SerializedProperty m_StageColor         = prop.FindPropertyRelative("m_StageColor");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_Toggle, prop, "Axis Line", show, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (ChartEditorHelper.IsToggle(m_Toggle, prop))
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Width);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Opacity);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BarColor);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BarBackgroundColor);
                drawRect.y    += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                m_DataFoldout  = EditorGUI.Foldout(drawRect, m_DataFoldout, "Stage Color");
                drawRect.width = pos.width;
                drawRect.y    += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                if (m_DataFoldout)
                {
                    ChartEditorHelper.MakeList(ref drawRect, ref m_DataSize, m_StageColor);
                }
                --EditorGUI.indentLevel;
            }
        }
예제 #8
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show          = prop.FindPropertyRelative("m_Show");
            SerializedProperty type          = prop.FindPropertyRelative("m_Type");
            SerializedProperty m_FixedWidth  = prop.FindPropertyRelative("m_FixedWidth");
            SerializedProperty m_FixedHeight = prop.FindPropertyRelative("m_FixedHeight");
            SerializedProperty m_MinWidth    = prop.FindPropertyRelative("m_MinWidth");
            SerializedProperty m_MinHeight   = prop.FindPropertyRelative("m_MinHeight");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_TooltipModuleToggle, "Tooltip", show);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_TooltipModuleToggle)
            {
                EditorGUI.PropertyField(drawRect, type);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FixedWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FixedHeight);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_MinWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_MinHeight);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            }
        }
예제 #9
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;

            SerializedProperty m_Left     = prop.FindPropertyRelative("m_Left");
            SerializedProperty m_Right    = prop.FindPropertyRelative("m_Right");
            SerializedProperty m_Top      = prop.FindPropertyRelative("m_Top");
            SerializedProperty m_Bottom   = prop.FindPropertyRelative("m_Bottom");
            SerializedProperty m_Tickness = prop.FindPropertyRelative("m_Tickness");
            SerializedProperty m_FontSize = prop.FindPropertyRelative("m_FontSize");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_CoordinateModuleToggle, "Coordinate");
            EditorGUI.LabelField(drawRect, "Coordinate", EditorStyles.boldLabel);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_CoordinateModuleToggle)
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Left);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Right);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Top);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Bottom);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Tickness);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FontSize);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #10
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;

            SerializedProperty m_Show            = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_Left            = prop.FindPropertyRelative("m_Left");
            SerializedProperty m_Right           = prop.FindPropertyRelative("m_Right");
            SerializedProperty m_Top             = prop.FindPropertyRelative("m_Top");
            SerializedProperty m_Bottom          = prop.FindPropertyRelative("m_Bottom");
            SerializedProperty m_BackgroundColor = prop.FindPropertyRelative("m_BackgroundColor");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_GridModuleToggle, "Grid", m_Show);
            EditorGUI.LabelField(drawRect, "Grid", EditorStyles.boldLabel);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_GridModuleToggle)
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Left);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Right);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Top);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Bottom);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BackgroundColor);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #11
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            SerializedProperty m_Name      = prop.FindPropertyRelative("m_Name");
            SerializedProperty m_Max       = prop.FindPropertyRelative("m_Max");
            SerializedProperty m_Min       = prop.FindPropertyRelative("m_Min");
            SerializedProperty m_TextStyle = prop.FindPropertyRelative("m_TextStyle");
            Rect  drawRect          = pos;
            float defaultLabelWidth = EditorGUIUtility.labelWidth;
            float defaultFieldWidth = EditorGUIUtility.fieldWidth;

            drawRect.height = EditorGUIUtility.singleLineHeight;

            int index = ChartEditorHelper.GetIndexFromPath(prop);

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_RadarModuleToggle, prop, "Indicator " + index, m_Name, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (ChartEditorHelper.IsToggle(m_RadarModuleToggle, prop))
            {
                ++EditorGUI.indentLevel;

                EditorGUI.PropertyField(drawRect, m_Name);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Min);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Max);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_TextStyle);
                drawRect.y += EditorGUI.GetPropertyHeight(m_TextStyle);

                --EditorGUI.indentLevel;
            }
        }
예제 #12
0
        public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
        {
            if (ChartEditorHelper.IsToggle(m_SerieSymbolToggle, prop))
            {
                SerializedProperty  m_SizeType = prop.FindPropertyRelative("m_SizeType");
                SerieSymbolSizeType sizeType   = (SerieSymbolSizeType)m_SizeType.enumValueIndex;
                var hig = 9 * EditorGUIUtility.singleLineHeight + 9 * EditorGUIUtility.standardVerticalSpacing;
                switch (sizeType)
                {
                case SerieSymbolSizeType.Custom:
                    break;

                case SerieSymbolSizeType.FromData:
                    hig += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
                    break;

                case SerieSymbolSizeType.Callback:
                    break;
                }
                return(hig);
            }
            else
            {
                return(EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
            }
        }
예제 #13
0
        public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
        {
            int propNum = 1;

            if (ChartEditorHelper.IsToggle(m_RadarModuleToggle, prop))
            {
                propNum += 9;
                if (m_IndicatorJsonAreaToggle)
                {
                    propNum += 4;
                }
                float height = propNum * EditorGUIUtility.singleLineHeight + (propNum - 1) * EditorGUIUtility.standardVerticalSpacing;
                height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_SplitLine"));
                height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_SplitArea"));

                if (ChartEditorHelper.IsToggle(m_IndicatorToggle, prop))
                {
                    m_IndicatorList = prop.FindPropertyRelative("m_IndicatorList");
                    height         += EditorGUIUtility.singleLineHeight * 3 + EditorGUIUtility.standardVerticalSpacing;

                    for (int i = 0; i < m_IndicatorList.arraySize; i++)
                    {
                        height += EditorGUI.GetPropertyHeight(m_IndicatorList.GetArrayElementAtIndex(i));
                    }
                }
                return(height);
            }
            else
            {
                return(EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing);
            }
        }
예제 #14
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show           = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_OnZero       = prop.FindPropertyRelative("m_OnZero");
            SerializedProperty m_Symbol       = prop.FindPropertyRelative("m_Symbol");
            SerializedProperty m_SymbolWidth  = prop.FindPropertyRelative("m_SymbolWidth");
            SerializedProperty m_SymbolHeight = prop.FindPropertyRelative("m_SymbolHeight");
            SerializedProperty m_SymbolOffset = prop.FindPropertyRelative("m_SymbolOffset");
            SerializedProperty m_SymbolDent   = prop.FindPropertyRelative("m_SymbolDent");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AxisLineToggle, "Axis Line", show, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_AxisLineToggle)
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_OnZero);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Symbol);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_SymbolWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_SymbolHeight);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_SymbolOffset);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_SymbolDent);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #15
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show             = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_AlignWithLabel = prop.FindPropertyRelative("m_AlignWithLabel");
            SerializedProperty m_Inside         = prop.FindPropertyRelative("m_Inside");
            SerializedProperty m_Length         = prop.FindPropertyRelative("m_Length");
            SerializedProperty m_Width          = prop.FindPropertyRelative("m_Width");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AxisTickToggle, "Axis Tick", show, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_AxisTickToggle)
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_AlignWithLabel);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Inside);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Length);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Width);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #16
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show           = prop.FindPropertyRelative("m_Show");
            SerializedProperty text           = prop.FindPropertyRelative("m_Text");
            SerializedProperty m_TextStyle    = prop.FindPropertyRelative("m_TextStyle");
            SerializedProperty subText        = prop.FindPropertyRelative("m_SubText");
            SerializedProperty m_SubTextStyle = prop.FindPropertyRelative("m_SubTextStyle");
            SerializedProperty m_ItemGap      = prop.FindPropertyRelative("m_ItemGap");
            SerializedProperty location       = prop.FindPropertyRelative("m_Location");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_TitleModuleToggle, "Title", show);
            ++EditorGUI.indentLevel;
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_TitleModuleToggle)
            {
                EditorGUI.PropertyField(drawRect, text);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, subText);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_ItemGap, new GUIContent("Item Gap"));
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, location);
                drawRect.y += EditorGUI.GetPropertyHeight(location);
                EditorGUI.PropertyField(drawRect, m_TextStyle);
                drawRect.y += EditorGUI.GetPropertyHeight(m_TextStyle);
                EditorGUI.PropertyField(drawRect, m_SubTextStyle);
                drawRect.y += EditorGUI.GetPropertyHeight(m_SubTextStyle);
            }
            --EditorGUI.indentLevel;
        }
예제 #17
0
 protected void PropertyField(SerializedProperty prop, SerializedProperty relativeProp)
 {
     if (!ChartEditorHelper.PropertyField(ref m_DrawRect, m_Heights, m_KeyName, relativeProp))
     {
         Debug.LogError("PropertyField ERROR:" + prop.displayName + ", " + relativeProp);
     }
 }
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty m_Rotate      = prop.FindPropertyRelative("m_Rotate");
            SerializedProperty m_Color       = prop.FindPropertyRelative("m_Color");
            SerializedProperty m_FontSize    = prop.FindPropertyRelative("m_FontSize");
            SerializedProperty m_FontStyle   = prop.FindPropertyRelative("m_FontStyle");
            SerializedProperty m_Offset      = prop.FindPropertyRelative("m_Offset");
            SerializedProperty m_LineSpacing = prop.FindPropertyRelative("m_LineSpacing");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_TextStyleToggle, prop, null, null, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (ChartEditorHelper.IsToggle(m_TextStyleToggle, prop))
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Rotate);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Offset);
                drawRect.y += EditorGUI.GetPropertyHeight(m_Offset);
                EditorGUI.PropertyField(drawRect, m_Color);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FontSize);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FontStyle);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_LineSpacing);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #19
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;

            SerializedProperty m_LineSmoothStyle     = prop.FindPropertyRelative("m_LineSmoothStyle");
            SerializedProperty m_LineSmoothness      = prop.FindPropertyRelative("m_LineSmoothness");
            SerializedProperty m_LineSegmentDistance = prop.FindPropertyRelative("m_LineSegmentDistance");
            SerializedProperty m_CicleSmoothness     = prop.FindPropertyRelative("m_CicleSmoothness");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SettingsModuleToggle, "Settings");
            EditorGUI.LabelField(drawRect, "Settings", EditorStyles.boldLabel);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_SettingsModuleToggle)
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_LineSmoothStyle);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_LineSmoothness);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_LineSegmentDistance);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_CicleSmoothness);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #20
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show       = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_Name     = prop.FindPropertyRelative("m_Name");
            SerializedProperty m_Location = prop.FindPropertyRelative("m_Location");
            SerializedProperty m_Gap      = prop.FindPropertyRelative("m_Gap");
            SerializedProperty m_Rotate   = prop.FindPropertyRelative("m_Rotate");
            SerializedProperty m_Color    = prop.FindPropertyRelative("m_Color");
            SerializedProperty m_FontSize = prop.FindPropertyRelative("m_FontSize");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AxisNameToggle, "Axis Name", show, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_AxisNameToggle)
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Name);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Location);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Gap);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Rotate);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FontSize);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Color);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #21
0
        public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
        {
            float height = 0;

            if (ChartEditorHelper.IsToggle(m_AxisLineToggle, prop))
            {
                height += 2 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
                height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_AxisLine"));
                height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_SplitLine"));
                height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_AxisTick"));
                height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_AxisLabel"));
                if (m_DataFoldout)
                {
                    SerializedProperty m_Data = prop.FindPropertyRelative("m_AxisLabelText");
                    int num = m_Data.arraySize + 1;
                    height += num * EditorGUIUtility.singleLineHeight + (num - 1) * EditorGUIUtility.standardVerticalSpacing;
                    height += EditorGUIUtility.standardVerticalSpacing;
                }
                return(height);
            }
            else
            {
                return(1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing);
            }
        }
예제 #22
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show         = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_Type       = prop.FindPropertyRelative("m_Type");
            SerializedProperty m_FilterMode = prop.FindPropertyRelative("m_FilterMode");
            //SerializedProperty m_Orient = prop.FindPropertyRelative("m_Orient");
            SerializedProperty m_ShowDataShadow  = prop.FindPropertyRelative("m_ShowDataShadow");
            SerializedProperty m_ShowDetail      = prop.FindPropertyRelative("m_ShowDetail");
            SerializedProperty m_ZoomLock        = prop.FindPropertyRelative("m_ZoomLock");
            SerializedProperty m_Realtime        = prop.FindPropertyRelative("m_Realtime");
            SerializedProperty m_BackgroundColor = prop.FindPropertyRelative("m_BackgroundColor");
            SerializedProperty m_Height          = prop.FindPropertyRelative("m_Height");
            SerializedProperty m_Bottom          = prop.FindPropertyRelative("m_Bottom");
            SerializedProperty m_RangeMode       = prop.FindPropertyRelative("m_RangeMode");
            SerializedProperty m_Start           = prop.FindPropertyRelative("m_Start");
            SerializedProperty m_End             = prop.FindPropertyRelative("m_End");
            //SerializedProperty m_StartValue = prop.FindPropertyRelative("m_StartValue");
            //SerializedProperty m_EndValue = prop.FindPropertyRelative("m_EndValue");
            SerializedProperty m_ScrollSensitivity = prop.FindPropertyRelative("m_ScrollSensitivity");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_DataZoomModuleToggle, "DataZoom", show);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_DataZoomModuleToggle)
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Type);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_FilterMode);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                //EditorGUI.PropertyField(drawRect, m_Orient);
                //drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_ShowDataShadow);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_ShowDetail);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_ZoomLock);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Realtime);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_ScrollSensitivity);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BackgroundColor);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Height);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Bottom);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_RangeMode);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Start);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_End);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #23
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            InitProperty(prop);
            Rect  drawRect          = pos;
            float defaultLabelWidth = EditorGUIUtility.labelWidth;
            float defaultFieldWidth = EditorGUIUtility.fieldWidth;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            int index = ChartEditorHelper.GetIndexFromPath(prop);

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_RadarModuleToggle, prop, "Radar " + index, null, true);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (ChartEditorHelper.IsToggle(m_RadarModuleToggle, prop))
            {
                ++EditorGUI.indentLevel;

                EditorGUIUtility.labelWidth = defaultLabelWidth;
                EditorGUIUtility.fieldWidth = defaultFieldWidth;
                EditorGUI.PropertyField(drawRect, m_Shape);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_PositionType);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;

                EditorGUI.LabelField(drawRect, "Center");
                var startX      = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15;
                var tempWidth   = (pos.width - startX + 35) / 2;
                var centerXRect = new Rect(startX, drawRect.y, tempWidth, drawRect.height);
                var centerYRect = new Rect(centerXRect.x + tempWidth - 20, drawRect.y, tempWidth, drawRect.height);
                while (m_Center.arraySize < 2)
                {
                    m_Center.InsertArrayElementAtIndex(m_Center.arraySize);
                }
                EditorGUI.PropertyField(centerXRect, m_Center.GetArrayElementAtIndex(0), GUIContent.none);
                EditorGUI.PropertyField(centerYRect, m_Center.GetArrayElementAtIndex(1), GUIContent.none);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;

                EditorGUI.PropertyField(drawRect, m_Radius);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_SplitNumber);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;

                EditorGUI.PropertyField(drawRect, m_SplitLine);
                drawRect.y += EditorGUI.GetPropertyHeight(m_SplitLine);
                EditorGUI.PropertyField(drawRect, m_SplitArea);
                drawRect.y += EditorGUI.GetPropertyHeight(m_SplitArea);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                ChartEditorHelper.MakeFoldout(ref drawRect, ref m_IndicatorToggle, prop, "Indicators", m_Indicator, false);
                ChartEditorHelper.MakeJsonData(ref drawRect, ref m_IndicatorJsonAreaToggle, ref m_IndicatorJsonAreaText, prop, pos.width, 20);
                drawRect.width = pos.width;
                drawRect.x     = pos.x;
                if (ChartEditorHelper.IsToggle(m_IndicatorToggle, prop))
                {
                    EditorGUI.PropertyField(drawRect, m_IndicatorGap);
                    drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                    ChartEditorHelper.MakeList(ref drawRect, ref m_IndicatorSize, m_IndicatorList);
                }
                --EditorGUI.indentLevel;
            }
        }
예제 #24
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            InitProperty(prop);
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_LineModuleToggle, "Line");
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_LineModuleToggle)
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Tickness);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;

                drawRect.width = EditorGUIUtility.labelWidth + 10;
                EditorGUI.PropertyField(drawRect, m_Point);
                if (m_Point.boolValue)
                {
                    drawRect.x = EditorGUIUtility.labelWidth + 15;
                    EditorGUI.LabelField(drawRect, "Width");
                    drawRect.x = EditorGUIUtility.labelWidth + 65;
                    float tempWidth = EditorGUIUtility.currentViewWidth - EditorGUIUtility.labelWidth - 70;
                    if (tempWidth < 20)
                    {
                        tempWidth = 20;
                    }
                    drawRect.width = tempWidth;
                    EditorGUI.PropertyField(drawRect, m_PointWidth, GUIContent.none);
                    drawRect.x     = pos.x;
                    drawRect.width = pos.width;
                }
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;

                drawRect.width = EditorGUIUtility.labelWidth + 10;
                EditorGUI.PropertyField(drawRect, m_Smooth);
                if (m_Smooth.boolValue)
                {
                    drawRect.x = EditorGUIUtility.labelWidth + 15;
                    EditorGUI.LabelField(drawRect, "Style");
                    drawRect.x = EditorGUIUtility.labelWidth + 65;
                    float tempWidth = EditorGUIUtility.currentViewWidth - EditorGUIUtility.labelWidth - 70;
                    if (tempWidth < 20)
                    {
                        tempWidth = 20;
                    }
                    drawRect.width = tempWidth;
                    EditorGUI.PropertyField(drawRect, m_SmoothStyle, GUIContent.none);
                    drawRect.x     = pos.x;
                    drawRect.width = pos.width;
                }
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;

                EditorGUI.PropertyField(drawRect, m_Area);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #25
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show            = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_SelectedMode  = prop.FindPropertyRelative("m_SelectedMode");
            SerializedProperty orient          = prop.FindPropertyRelative("m_Orient");
            SerializedProperty location        = prop.FindPropertyRelative("m_Location");
            SerializedProperty itemWidth       = prop.FindPropertyRelative("m_ItemWidth");
            SerializedProperty itemHeight      = prop.FindPropertyRelative("m_ItemHeight");
            SerializedProperty itemGap         = prop.FindPropertyRelative("m_ItemGap");
            SerializedProperty m_ItemAutoColor = prop.FindPropertyRelative("m_ItemAutoColor");
            SerializedProperty m_Formatter     = prop.FindPropertyRelative("m_Formatter");
            SerializedProperty m_Data          = prop.FindPropertyRelative("m_Data");
            SerializedProperty m_Icons         = prop.FindPropertyRelative("m_Icons");
            SerializedProperty m_TextStyle     = prop.FindPropertyRelative("m_TextStyle");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_LegendModuleToggle, "Legend", show);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (m_LegendModuleToggle)
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, itemWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, itemHeight);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, itemGap);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_ItemAutoColor);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_SelectedMode);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, orient);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, location);
                drawRect.y += EditorGUI.GetPropertyHeight(location);
                EditorGUI.PropertyField(drawRect, m_Formatter);
                drawRect.y    += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                drawRect.width = EditorGUIUtility.labelWidth + 10;
                m_DataFoldout  = EditorGUI.Foldout(drawRect, m_DataFoldout, "Data");
                ChartEditorHelper.MakeJsonData(ref drawRect, ref m_ShowJsonDataArea, ref m_JsonDataAreaText, prop, pos.width);
                drawRect.width = pos.width;
                if (m_DataFoldout)
                {
                    ChartEditorHelper.MakeList(ref drawRect, ref m_DataSize, m_Data);
                }
                m_IconsFoldout = EditorGUI.Foldout(drawRect, m_IconsFoldout, "Icons");
                drawRect.y    += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                if (m_IconsFoldout)
                {
                    ChartEditorHelper.MakeList(ref drawRect, ref m_IconsSize, m_Icons);
                }
                EditorGUI.PropertyField(drawRect, m_TextStyle);
                drawRect.y += EditorGUI.GetPropertyHeight(m_TextStyle);
                --EditorGUI.indentLevel;
            }
        }
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty m_Type              = prop.FindPropertyRelative("m_Type");
            SerializedProperty m_SizeType          = prop.FindPropertyRelative("m_SizeType");
            SerializedProperty m_Size              = prop.FindPropertyRelative("m_Size");
            SerializedProperty m_SelectedSize      = prop.FindPropertyRelative("m_SelectedSize");
            SerializedProperty m_DataIndex         = prop.FindPropertyRelative("m_DataIndex");
            SerializedProperty m_DataScale         = prop.FindPropertyRelative("m_DataScale");
            SerializedProperty m_SelectedDataScale = prop.FindPropertyRelative("m_SelectedDataScale");
            SerializedProperty m_StartIndex        = prop.FindPropertyRelative("m_StartIndex");
            SerializedProperty m_Interval          = prop.FindPropertyRelative("m_Interval");
            SerializedProperty m_ForceShowLast     = prop.FindPropertyRelative("m_ForceShowLast");
            SerializedProperty m_Gap = prop.FindPropertyRelative("m_Gap");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SerieSymbolToggle, prop, null, m_Type, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (ChartEditorHelper.IsToggle(m_SerieSymbolToggle, prop))
            {
                ++EditorGUI.indentLevel;

                EditorGUI.PropertyField(drawRect, m_Gap);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_SizeType);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                SerieSymbolSizeType sizeType = (SerieSymbolSizeType)m_SizeType.enumValueIndex;
                switch (sizeType)
                {
                case SerieSymbolSizeType.Custom:
                    EditorGUI.PropertyField(drawRect, m_Size);
                    drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                    EditorGUI.PropertyField(drawRect, m_SelectedSize);
                    drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                    break;

                case SerieSymbolSizeType.FromData:
                    EditorGUI.PropertyField(drawRect, m_DataIndex);
                    drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                    EditorGUI.PropertyField(drawRect, m_DataScale);
                    drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                    EditorGUI.PropertyField(drawRect, m_SelectedDataScale);
                    drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                    break;

                case SerieSymbolSizeType.Callback:
                    break;
                }
                EditorGUI.PropertyField(drawRect, m_StartIndex);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Interval);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_ForceShowLast);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                --EditorGUI.indentLevel;
            }
        }
예제 #27
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show               = prop.FindPropertyRelative("m_Show");
            SerializedProperty m_Color            = prop.FindPropertyRelative("m_Color");
            SerializedProperty m_ToColor          = prop.FindPropertyRelative("m_ToColor");
            SerializedProperty m_BackgroundColor  = prop.FindPropertyRelative("m_BackgroundColor");
            SerializedProperty m_BackgroundWidth  = prop.FindPropertyRelative("m_BackgroundWidth");
            SerializedProperty m_CenterColor      = prop.FindPropertyRelative("m_CenterColor");
            SerializedProperty m_CenterGap        = prop.FindPropertyRelative("m_CenterGap");
            SerializedProperty m_BorderType       = prop.FindPropertyRelative("m_BorderType");
            SerializedProperty m_BorderWidth      = prop.FindPropertyRelative("m_BorderWidth");
            SerializedProperty m_BorderColor      = prop.FindPropertyRelative("m_BorderColor");
            SerializedProperty m_Opacity          = prop.FindPropertyRelative("m_Opacity");
            SerializedProperty m_TooltipFormatter = prop.FindPropertyRelative("m_TooltipFormatter");
            SerializedProperty m_NumericFormatter = prop.FindPropertyRelative("m_NumericFormatter");
            SerializedProperty m_CornerRadius     = prop.FindPropertyRelative("m_CornerRadius");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_ItemStyleToggle, prop, "Item Style", show, false);
            drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
            if (ChartEditorHelper.IsToggle(m_ItemStyleToggle, prop))
            {
                ++EditorGUI.indentLevel;
                EditorGUI.PropertyField(drawRect, m_Color);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_ToColor);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BackgroundColor);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BackgroundWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_CenterColor);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_CenterGap);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BorderType);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BorderWidth);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_BorderColor);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_Opacity);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_TooltipFormatter);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                EditorGUI.PropertyField(drawRect, m_NumericFormatter);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                ChartEditorHelper.MakeFoldout(ref drawRect, ref m_CornerRadiusToggle, m_CornerRadius, "Corner Radius", null, false);
                drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
                if (ChartEditorHelper.IsToggle(m_CornerRadiusToggle, m_CornerRadius))
                {
                    ChartEditorHelper.MakeList(ref drawRect, ref this.m_CornerRadius, m_CornerRadius, false, false);
                }
                --EditorGUI.indentLevel;
            }
        }
예제 #28
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            Rect drawRect = pos;

            drawRect.height = EditorGUIUtility.singleLineHeight;
            SerializedProperty show = prop.FindPropertyRelative("m_Show");

            ChartEditorHelper.MakeFoldout(ref drawRect, ref m_TooltipModuleToggle, "Tooltip", show);
        }
예제 #29
0
 protected void PropertyTwoFiled(SerializedProperty prop, SerializedProperty relativeListProp, string labelName = null)
 {
     if (string.IsNullOrEmpty(labelName))
     {
         labelName = relativeListProp.displayName;
     }
     ChartEditorHelper.MakeTwoField(ref m_DrawRect, m_DefaultWidth, relativeListProp, labelName);
     m_Heights[m_KeyName] += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
 }
예제 #30
0
        public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)
        {
            float height = 0;

            if (ChartEditorHelper.IsToggle(m_AxisNameToggle, prop))
            {
                height += 7 * EditorGUIUtility.singleLineHeight + 6 * EditorGUIUtility.standardVerticalSpacing;
            }
            return(height);
        }