mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 09:50:15 +00:00
增加AxisLabel的onZero参数可将Label显示在0刻度上
This commit is contained in:
@@ -31,6 +31,7 @@ namespace XCharts
|
||||
SerializedProperty m_FontStyle = prop.FindPropertyRelative("m_FontStyle");
|
||||
SerializedProperty m_ForceENotation = prop.FindPropertyRelative("m_ForceENotation");
|
||||
SerializedProperty m_ShowAsPositiveNumber = prop.FindPropertyRelative("m_ShowAsPositiveNumber");
|
||||
SerializedProperty m_OnZero = prop.FindPropertyRelative("m_OnZero");
|
||||
SerializedProperty m_TextLimit = prop.FindPropertyRelative("m_TextLimit");
|
||||
|
||||
ChartEditorHelper.MakeFoldout(ref drawRect, ref m_AxisLabelToggle, prop, "Axis Label", show, false);
|
||||
@@ -38,6 +39,8 @@ namespace XCharts
|
||||
if (ChartEditorHelper.IsToggle(m_AxisLabelToggle, prop))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_OnZero);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Inside);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Interval);
|
||||
@@ -69,7 +72,7 @@ namespace XCharts
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisLabelToggle, prop))
|
||||
{
|
||||
height += 11 * EditorGUIUtility.singleLineHeight + 10 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += 12 * EditorGUIUtility.singleLineHeight + 11 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_TextLimit"));
|
||||
}
|
||||
return height;
|
||||
|
||||
@@ -66,7 +66,8 @@ namespace XCharts
|
||||
float height = 0;
|
||||
if (ChartEditorHelper.IsToggle(m_AxisNameToggle, prop))
|
||||
{
|
||||
height += 7 * EditorGUIUtility.singleLineHeight + 6 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += 6 * EditorGUIUtility.singleLineHeight + 5 * EditorGUIUtility.standardVerticalSpacing;
|
||||
height += EditorGUI.GetPropertyHeight(prop.FindPropertyRelative("m_Offset"));
|
||||
}
|
||||
return height;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user