增加RingChart环形图

This commit is contained in:
monitor1394
2020-03-08 10:47:48 +08:00
parent 2c6d9dc483
commit e595034833
34 changed files with 1030 additions and 236 deletions

View File

@@ -21,14 +21,14 @@ namespace XCharts
Rect drawRect = pos;
drawRect.height = EditorGUIUtility.singleLineHeight;
SerializedProperty show = prop.FindPropertyRelative("m_Show");
SerializedProperty m_textStyle = prop.FindPropertyRelative("m_textStyle");
SerializedProperty m_TextStyle = prop.FindPropertyRelative("m_TextStyle");
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_TitleStyleToggle, prop, "Title Style", show, false);
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
if (ChartEditorHelper.IsToggle(m_TitleStyleToggle, prop))
{
++EditorGUI.indentLevel;
EditorGUI.PropertyField(drawRect, m_textStyle);
drawRect.y += EditorGUI.GetPropertyHeight(m_textStyle);
EditorGUI.PropertyField(drawRect, m_TextStyle);
drawRect.y += EditorGUI.GetPropertyHeight(m_TextStyle);
--EditorGUI.indentLevel;
}
}
@@ -39,7 +39,7 @@ namespace XCharts
if (ChartEditorHelper.IsToggle(m_TitleStyleToggle, prop))
{
height += 1 * EditorGUIUtility.singleLineHeight + 1 * EditorGUIUtility.standardVerticalSpacing;
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_textStyle"));
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_TextStyle"));
}
else
{