mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 17:00:08 +00:00
增加双坐标轴支持
This commit is contained in:
19
Scripts/Editor/PropertyDrawers/YAxisDrawer.cs
Normal file
19
Scripts/Editor/PropertyDrawers/YAxisDrawer.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(YAxis), true)]
|
||||
public class YAxisDrawer : AxisDrawer
|
||||
{
|
||||
protected override string GetDisplayName(string displayName)
|
||||
{
|
||||
if (displayName.StartsWith("Element"))
|
||||
{
|
||||
displayName = displayName.Replace("Element", "Y Axis");
|
||||
}
|
||||
return displayName;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user