mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-21 07:50:16 +00:00
优化代码,更好的支持自定义图表
This commit is contained in:
@@ -209,14 +209,12 @@ namespace XCharts
|
||||
if (m_Flodouts[prop.displayName])
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
//prop.arraySize = EditorGUILayout.IntField("Size", prop.arraySize);
|
||||
var currRect = EditorGUILayout.GetControlRect(GUILayout.Height(0));
|
||||
currRect.y -= EditorGUIUtility.singleLineHeight;
|
||||
var rect1 = new Rect(currRect.width + k_IconXOffset,
|
||||
currRect.y + k_IconYOffset,
|
||||
k_IconWidth, EditorGUIUtility.singleLineHeight);
|
||||
EditorGUI.DrawRect(rect1, Color.blue);
|
||||
if (GUI.Button(rect1, ChartEditorHelper.Styles.iconAdd))// ChartEditorHelper.Styles.invisibleButton))
|
||||
if (GUI.Button(rect1, ChartEditorHelper.Styles.iconAdd, ChartEditorHelper.Styles.invisibleButton))
|
||||
{
|
||||
prop.InsertArrayElementAtIndex(prop.arraySize > 0 ? prop.arraySize - 1 : 0);
|
||||
var chart = prop.GetArrayElementAtIndex(0).serializedObject.targetObject as BaseChart;
|
||||
|
||||
Reference in New Issue
Block a user