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