mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-30 05:08:48 +00:00
增加HelpDoc帮助文档跳转
This commit is contained in:
@@ -82,8 +82,9 @@ namespace XCharts.Editor
|
|||||||
title,
|
title,
|
||||||
editor.baseProperty,
|
editor.baseProperty,
|
||||||
editor.showProperty,
|
editor.showProperty,
|
||||||
() => { ResetComponentEditor(id); },
|
() => { if (EditorUtility.DisplayDialog("", "Sure reset " + editor.component.GetType().Name + "?", "Yes", "Cancel")) ResetComponentEditor(id); },
|
||||||
() => { RemoveComponentEditor(id); }
|
() => { if (EditorUtility.DisplayDialog("", "Sure remove " + editor.component.GetType().Name + "?", "Yes", "Cancel")) RemoveComponentEditor(id); },
|
||||||
|
() => { Application.OpenURL("https://xcharts-team.github.io/docs/configuration/#" + editor.component.GetType().Name.ToLower()); }
|
||||||
);
|
);
|
||||||
if (displayContent)
|
if (displayContent)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace XCharts.Editor
|
|||||||
|
|
||||||
public static void SecondField(Rect drawRect, SerializedProperty prop)
|
public static void SecondField(Rect drawRect, SerializedProperty prop)
|
||||||
{
|
{
|
||||||
RectOffset offset = new RectOffset(-(int) EditorGUIUtility.labelWidth, 0, 0, 0);
|
RectOffset offset = new RectOffset(-(int)EditorGUIUtility.labelWidth, 0, 0, 0);
|
||||||
drawRect = offset.Add(drawRect);
|
drawRect = offset.Add(drawRect);
|
||||||
EditorGUI.PropertyField(drawRect, prop, GUIContent.none);
|
EditorGUI.PropertyField(drawRect, prop, GUIContent.none);
|
||||||
drawRect = offset.Remove(drawRect);
|
drawRect = offset.Remove(drawRect);
|
||||||
@@ -180,7 +180,7 @@ namespace XCharts.Editor
|
|||||||
if (prop.propertyType == SerializedPropertyType.Boolean)
|
if (prop.propertyType == SerializedPropertyType.Boolean)
|
||||||
{
|
{
|
||||||
if (!propEnable)
|
if (!propEnable)
|
||||||
using(new EditorGUI.DisabledScope(true))
|
using (new EditorGUI.DisabledScope(true))
|
||||||
MakeBool(drawRect, prop);
|
MakeBool(drawRect, prop);
|
||||||
else
|
else
|
||||||
MakeBool(drawRect, prop);
|
MakeBool(drawRect, prop);
|
||||||
@@ -444,7 +444,7 @@ namespace XCharts.Editor
|
|||||||
if (prop.propertyType == SerializedPropertyType.Float && prop.floatValue < minValue)
|
if (prop.propertyType == SerializedPropertyType.Float && prop.floatValue < minValue)
|
||||||
prop.floatValue = minValue;
|
prop.floatValue = minValue;
|
||||||
if (prop.propertyType == SerializedPropertyType.Integer && prop.intValue < minValue)
|
if (prop.propertyType == SerializedPropertyType.Integer && prop.intValue < minValue)
|
||||||
prop.intValue = (int) minValue;
|
prop.intValue = (int)minValue;
|
||||||
var hig = EditorGUI.GetPropertyHeight(prop);
|
var hig = EditorGUI.GetPropertyHeight(prop);
|
||||||
drawRect.y += hig;
|
drawRect.y += hig;
|
||||||
heights[key] += hig;
|
heights[key] += hig;
|
||||||
@@ -459,7 +459,7 @@ namespace XCharts.Editor
|
|||||||
if (prop.propertyType == SerializedPropertyType.Float && prop.floatValue > maxValue)
|
if (prop.propertyType == SerializedPropertyType.Float && prop.floatValue > maxValue)
|
||||||
prop.floatValue = maxValue;
|
prop.floatValue = maxValue;
|
||||||
if (prop.propertyType == SerializedPropertyType.Integer && prop.intValue > maxValue)
|
if (prop.propertyType == SerializedPropertyType.Integer && prop.intValue > maxValue)
|
||||||
prop.intValue = (int) maxValue;
|
prop.intValue = (int)maxValue;
|
||||||
var hig = EditorGUI.GetPropertyHeight(prop);
|
var hig = EditorGUI.GetPropertyHeight(prop);
|
||||||
drawRect.y += hig;
|
drawRect.y += hig;
|
||||||
heights[key] += hig;
|
heights[key] += hig;
|
||||||
@@ -635,11 +635,13 @@ namespace XCharts.Editor
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal static bool DrawHeader(string title, SerializedProperty group, SerializedProperty activeField,
|
internal static bool DrawHeader(string title, SerializedProperty group, SerializedProperty activeField,
|
||||||
Action resetAction, Action removeAction)
|
Action resetAction, Action removeAction, Action docAction)
|
||||||
{
|
{
|
||||||
if (group == null) return false;
|
if (group == null) return false;
|
||||||
group.isExpanded = DrawHeader(title, group.isExpanded, false, activeField, null,
|
group.isExpanded = DrawHeader(title, group.isExpanded, false, activeField, null,
|
||||||
new HeaderMenuInfo("Reset", resetAction), new HeaderMenuInfo("Remove", removeAction));
|
new HeaderMenuInfo("Reset", resetAction),
|
||||||
|
new HeaderMenuInfo("Remove", removeAction),
|
||||||
|
new HeaderMenuInfo("HelpDoc", docAction));
|
||||||
return group.isExpanded;
|
return group.isExpanded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class BarChart : BaseChart
|
public class BarChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class CandlestickChart : BaseChart
|
public class CandlestickChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class HeatmapChart : BaseChart
|
public class HeatmapChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class LineChart : BaseChart
|
public class LineChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class ParallelChart : BaseChart
|
public class ParallelChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class PieChart : BaseChart
|
public class PieChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class PolarChart : BaseChart
|
public class PolarChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class RadarChart : BaseChart
|
public class RadarChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class RingChart : BaseChart
|
public class RingChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class ScatterChart : BaseChart
|
public class ScatterChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class SimplifiedBarChart : BaseChart
|
public class SimplifiedBarChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class SimplifiedCandlestickChart : BaseChart
|
public class SimplifiedCandlestickChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ namespace XCharts.Runtime
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
[RequireComponent(typeof(RectTransform))]
|
[RequireComponent(typeof(RectTransform))]
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
|
[HelpURL("https://xcharts-team.github.io/docs/configuration")]
|
||||||
public class SimplifiedLineChart : BaseChart
|
public class SimplifiedLineChart : BaseChart
|
||||||
{
|
{
|
||||||
protected override void DefaultChart()
|
protected override void DefaultChart()
|
||||||
|
|||||||
Reference in New Issue
Block a user