mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 06:20:15 +00:00
优化SerieData的自定义图标不与SerieLabel关联,可单独控制是否显示
This commit is contained in:
@@ -303,9 +303,9 @@ namespace XCharts
|
||||
var tempWidth = (drawRect.width - startX + 72) / 2;
|
||||
var centerXRect = new Rect(startX, drawRect.y, tempWidth, drawRect.height);
|
||||
var centerYRect = new Rect(centerXRect.x + tempWidth - 58, drawRect.y, tempWidth, drawRect.height);
|
||||
var x = EditorGUI.FloatField(centerXRect, m_IconOffset.vector2Value.x);
|
||||
var y = EditorGUI.FloatField(centerYRect, m_IconOffset.vector2Value.y);
|
||||
m_IconOffset.vector2Value = new Vector2(x, y);
|
||||
var x = EditorGUI.FloatField(centerXRect, m_IconOffset.vector3Value.x);
|
||||
var y = EditorGUI.FloatField(centerYRect, m_IconOffset.vector3Value.y);
|
||||
m_IconOffset.vector3Value = new Vector3(x, y);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace XCharts
|
||||
SerializedProperty show = prop.FindPropertyRelative("m_Show");
|
||||
SerializedProperty m_Position = prop.FindPropertyRelative("m_Position");
|
||||
SerializedProperty m_Formatter = prop.FindPropertyRelative("m_Formatter");
|
||||
SerializedProperty m_Distance = prop.FindPropertyRelative("m_Distance");
|
||||
SerializedProperty m_Offset = prop.FindPropertyRelative("m_Offset");
|
||||
SerializedProperty m_Rotate = prop.FindPropertyRelative("m_Rotate");
|
||||
SerializedProperty m_PaddingLeftRight = prop.FindPropertyRelative("m_PaddingLeftRight");
|
||||
SerializedProperty m_PaddingTopBottom = prop.FindPropertyRelative("m_PaddingTopBottom");
|
||||
@@ -41,10 +41,20 @@ namespace XCharts
|
||||
++EditorGUI.indentLevel;
|
||||
EditorGUI.PropertyField(drawRect, m_Position);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
EditorGUI.LabelField(drawRect, "Offset");
|
||||
var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15;
|
||||
var tempWidth = (drawRect.width - startX + 52) / 2;
|
||||
var centerXRect = new Rect(startX, drawRect.y, tempWidth, drawRect.height);
|
||||
var centerYRect = new Rect(centerXRect.x + tempWidth - 38, drawRect.y, tempWidth, drawRect.height);
|
||||
var x = EditorGUI.FloatField(centerXRect, m_Offset.vector3Value.x);
|
||||
var y = EditorGUI.FloatField(centerYRect, m_Offset.vector3Value.y);
|
||||
m_Offset.vector3Value = new Vector3(x, y);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
|
||||
EditorGUI.PropertyField(drawRect, m_Formatter);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user