XCharts 2.0

This commit is contained in:
monitor1394
2021-01-11 08:54:28 +08:00
parent 77f17c7dec
commit a1c2f554d4
327 changed files with 1304757 additions and 1512269 deletions

View File

@@ -1,9 +1,9 @@
/******************************************/
/* */
/* Copyright (c) 2018 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/******************************************/
/************************************************/
/* */
/* Copyright (c) 2018 - 2021 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/************************************************/
using UnityEditor;
using UnityEngine;
@@ -19,22 +19,30 @@ namespace XChartsDemo
drawRect.height = EditorGUIUtility.singleLineHeight;
var lastX = drawRect.x;
var lastWid = drawRect.width;
SerializedProperty m_Column = prop.FindPropertyRelative("m_Column");
SerializedProperty m_Name = prop.FindPropertyRelative("m_Name");
SerializedProperty m_SubName = prop.FindPropertyRelative("m_SubName");
SerializedProperty m_Title = prop.FindPropertyRelative("m_Title");
SerializedProperty m_Selected = prop.FindPropertyRelative("m_Selected");
SerializedProperty m_Panel = prop.FindPropertyRelative("m_Panel");
var fieldWid = EditorGUIUtility.currentViewWidth - 30 - 5 - 50 - 90;
var fieldWid = EditorGUIUtility.currentViewWidth - 30 - 5 - 40 - 80 - 50 - 100 - 6 * 2;
drawRect.width = 15;
EditorGUI.PropertyField(drawRect,m_Selected,GUIContent.none);
drawRect.x += 15;
EditorGUI.PropertyField(drawRect, m_Selected, GUIContent.none);
drawRect.x += 17;
drawRect.width = 80;
EditorGUI.PropertyField(drawRect, m_Name, GUIContent.none);
drawRect.x += 82;
drawRect.width = 50;
EditorGUI.PropertyField(drawRect,m_Name,GUIContent.none);
EditorGUI.PropertyField(drawRect, m_SubName, GUIContent.none);
drawRect.x += 52;
drawRect.width = fieldWid;
EditorGUI.PropertyField(drawRect,m_Title,GUIContent.none);
EditorGUI.PropertyField(drawRect, m_Title, GUIContent.none);
drawRect.x += fieldWid + 2;
drawRect.width = 90;
EditorGUI.PropertyField(drawRect,m_Panel,GUIContent.none);
drawRect.width = 100;
EditorGUI.PropertyField(drawRect, m_Panel, GUIContent.none);
drawRect.x += 102;
drawRect.width = 40;
EditorGUI.PropertyField(drawRect, m_Column, GUIContent.none);
}
public override float GetPropertyHeight(SerializedProperty prop, GUIContent label)

View File

@@ -1,10 +1,10 @@

/******************************************/
/* */
/* Copyright (c) 2018 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/******************************************/
/************************************************/
/* */
/* Copyright (c) 2018 - 2021 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/************************************************/
using UnityEditor;
@@ -19,6 +19,10 @@ namespace XChartsDemo
{
protected Demo m_Target;
protected SerializedProperty m_Script;
protected SerializedProperty m_LeftWidth;
protected SerializedProperty m_LeftButtonHeight;
protected SerializedProperty m_ChartSpacing;
protected SerializedProperty m_ChartSizeRatio;
protected SerializedProperty m_ButtonNormalColor;
protected SerializedProperty m_ButtonSelectedColor;
protected SerializedProperty m_ButtonHighlightColor;
@@ -27,6 +31,10 @@ namespace XChartsDemo
{
m_Target = (Demo)target;
m_Script = serializedObject.FindProperty("m_Script");
m_LeftWidth = serializedObject.FindProperty("m_LeftWidth");
m_ChartSpacing = serializedObject.FindProperty("m_ChartSpacing");
m_ChartSizeRatio = serializedObject.FindProperty("m_ChartSizeRatio");
m_LeftButtonHeight = serializedObject.FindProperty("m_LeftButtonHeight");
m_ButtonNormalColor = serializedObject.FindProperty("m_ButtonNormalColor");
m_ButtonSelectedColor = serializedObject.FindProperty("m_ButtonSelectedColor");
m_ButtonHighlightColor = serializedObject.FindProperty("m_ButtonHighlightColor");
@@ -42,6 +50,10 @@ namespace XChartsDemo
return;
}
serializedObject.Update();
EditorGUILayout.PropertyField(m_LeftWidth);
EditorGUILayout.PropertyField(m_LeftButtonHeight);
EditorGUILayout.PropertyField(m_ChartSpacing);
EditorGUILayout.PropertyField(m_ChartSizeRatio);
EditorGUILayout.PropertyField(m_ButtonNormalColor);
EditorGUILayout.PropertyField(m_ButtonSelectedColor);
EditorGUILayout.PropertyField(m_ButtonHighlightColor);