mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 00:20:18 +00:00
增加AxisName的Offset偏移配置支持
This commit is contained in:
@@ -16,7 +16,7 @@ namespace XCharts
|
||||
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_Offset = prop.FindPropertyRelative("m_Offset");
|
||||
SerializedProperty m_Rotate = prop.FindPropertyRelative("m_Rotate");
|
||||
SerializedProperty m_Color = prop.FindPropertyRelative("m_Color");
|
||||
SerializedProperty m_FontSize = prop.FindPropertyRelative("m_FontSize");
|
||||
@@ -31,8 +31,17 @@ namespace XCharts
|
||||
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_Offset);
|
||||
drawRect.y += EditorGUI.GetPropertyHeight(m_Offset);
|
||||
// EditorGUI.LabelField(drawRect, "Offset");
|
||||
// var startX = drawRect.x + EditorGUIUtility.labelWidth - EditorGUI.indentLevel * 15;
|
||||
// var tempWidth = (pos.width - startX + 35) / 2;
|
||||
// var xRect = new Rect(startX, drawRect.y, tempWidth, drawRect.height);
|
||||
// var yRect = new Rect(xRect.x + tempWidth - 20, drawRect.y, tempWidth, drawRect.height);
|
||||
// var x = EditorGUI.FloatField(xRect, m_Offset.vector2Value.x);
|
||||
// var y = EditorGUI.FloatField(yRect, m_Offset.vector2Value.y);
|
||||
// m_Offset.vector2Value = new Vector2(x,y);
|
||||
// drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Rotate);
|
||||
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
|
||||
EditorGUI.PropertyField(drawRect, m_Color);
|
||||
|
||||
Reference in New Issue
Block a user