TooltipEditor.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using UnityEditor;
  2. using XCharts.Runtime;
  3. namespace XCharts.Editor
  4. {
  5. [ComponentEditor(typeof(Tooltip))]
  6. public class TooltipEditor : MainComponentEditor<Tooltip>
  7. {
  8. public override void OnInspectorGUI()
  9. {
  10. ++EditorGUI.indentLevel;
  11. PropertyField("m_Type");
  12. PropertyField("m_Trigger");
  13. PropertyField("m_Position");
  14. PropertyField("m_FixedX");
  15. PropertyField("m_FixedY");
  16. PropertyField("m_Offset");
  17. PropertyField("m_ShowContent");
  18. PropertyField("m_AlwayShowContent");
  19. PropertyField("m_TitleFormatter");
  20. PropertyField("m_ItemFormatter");
  21. PropertyField("m_NumericFormatter");
  22. PropertyFiledMore(() =>
  23. {
  24. PropertyField("m_TitleHeight");
  25. PropertyField("m_ItemHeight");
  26. PropertyField("m_Marker");
  27. PropertyField("m_BorderWidth");
  28. PropertyField("m_BorderColor");
  29. PropertyField("m_PaddingLeftRight");
  30. PropertyField("m_PaddingTopBottom");
  31. PropertyField("m_BackgroundImage");
  32. PropertyField("m_BackgroundType");
  33. PropertyField("m_BackgroundColor");
  34. PropertyField("m_FixedWidth");
  35. PropertyField("m_FixedHeight");
  36. PropertyField("m_MinWidth");
  37. PropertyField("m_MinHeight");
  38. PropertyField("m_IgnoreDataDefaultContent");
  39. });
  40. PropertyField("m_LineStyle");
  41. PropertyField("m_TitleLabelStyle");
  42. PropertyListField("m_ContentLabelStyles");
  43. --EditorGUI.indentLevel;
  44. }
  45. }
  46. }