Ei kuvausta
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DataZoomEditor.cs 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using UnityEditor;
  2. using XCharts.Runtime;
  3. namespace XCharts.Editor
  4. {
  5. [ComponentEditor(typeof(DataZoom))]
  6. public class DataZoomEditor : MainComponentEditor<DataZoom>
  7. {
  8. public override void OnInspectorGUI()
  9. {
  10. var m_SupportInside = baseProperty.FindPropertyRelative("m_SupportInside");
  11. var m_SupportSlider = baseProperty.FindPropertyRelative("m_SupportSlider");
  12. var m_SupportMarquee = baseProperty.FindPropertyRelative("m_SupportMarquee");
  13. var m_Start = baseProperty.FindPropertyRelative("m_Start");
  14. var m_End = baseProperty.FindPropertyRelative("m_End");
  15. var m_MinShowNum = baseProperty.FindPropertyRelative("m_MinShowNum");
  16. ++EditorGUI.indentLevel;
  17. PropertyField("m_Orient");
  18. PropertyField("m_SupportInside");
  19. if (m_SupportInside.boolValue)
  20. {
  21. PropertyField("m_SupportInsideScroll");
  22. PropertyField("m_SupportInsideDrag");
  23. }
  24. PropertyField(m_SupportSlider);
  25. PropertyField(m_SupportMarquee);
  26. PropertyField("m_ZoomLock");
  27. PropertyField("m_ScrollSensitivity");
  28. PropertyField("m_RangeMode");
  29. PropertyField(m_Start);
  30. PropertyField(m_End);
  31. PropertyField("m_StartLock");
  32. PropertyField("m_EndLock");
  33. PropertyField(m_MinShowNum);
  34. if (m_Start.floatValue < 0) m_Start.floatValue = 0;
  35. if (m_End.floatValue > 100) m_End.floatValue = 100;
  36. if (m_MinShowNum.intValue < 0) m_MinShowNum.intValue = 0;
  37. if (m_SupportSlider.boolValue)
  38. {
  39. PropertyField("m_ShowDataShadow");
  40. PropertyField("m_ShowDetail");
  41. PropertyField("m_BackgroundColor");
  42. PropertyField("m_BorderWidth");
  43. PropertyField("m_BorderColor");
  44. PropertyField("m_FillerColor");
  45. PropertyField("m_Left");
  46. PropertyField("m_Right");
  47. PropertyField("m_Top");
  48. PropertyField("m_Bottom");
  49. PropertyField("m_LineStyle");
  50. PropertyField("m_AreaStyle");
  51. PropertyField("m_LabelStyle");
  52. PropertyListField("m_XAxisIndexs", true);
  53. PropertyListField("m_YAxisIndexs", true);
  54. }
  55. else
  56. {
  57. PropertyListField("m_XAxisIndexs", true);
  58. PropertyListField("m_YAxisIndexs", true);
  59. }
  60. PropertyField("m_MarqueeStyle");
  61. --EditorGUI.indentLevel;
  62. }
  63. }
  64. }