移除Pie组件,相关参数放到Settings中配置

This commit is contained in:
monitor1394
2019-10-16 19:15:55 +08:00
parent f88a44bd48
commit d9713447da
8 changed files with 22 additions and 132 deletions

View File

@@ -18,6 +18,8 @@ namespace XCharts
SerializedProperty m_LineSegmentDistance = prop.FindPropertyRelative("m_LineSegmentDistance");
SerializedProperty m_CicleSmoothness = prop.FindPropertyRelative("m_CicleSmoothness");
SerializedProperty m_VisualMapTriangeLen = prop.FindPropertyRelative("m_VisualMapTriangeLen");
SerializedProperty m_PieTooltipExtraRadius = prop.FindPropertyRelative("m_PieTooltipExtraRadius");
SerializedProperty m_PieSelectedOffset = prop.FindPropertyRelative("m_PieSelectedOffset");
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_SettingsModuleToggle, "Settings");
EditorGUI.LabelField(drawRect, "Settings", EditorStyles.boldLabel);
@@ -35,6 +37,10 @@ namespace XCharts
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(drawRect, m_VisualMapTriangeLen);
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(drawRect, m_PieTooltipExtraRadius);
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(drawRect, m_PieSelectedOffset);
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
--EditorGUI.indentLevel;
}
}
@@ -44,7 +50,7 @@ namespace XCharts
int num = 1;
if (m_SettingsModuleToggle)
{
num = 6;
num = 8;
}
return num * EditorGUIUtility.singleLineHeight + (num - 1) * EditorGUIUtility.standardVerticalSpacing;
}