Нема описа
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.

ItemStyleDrawer.cs 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using UnityEditor;
  2. using UnityEngine;
  3. using XCharts.Runtime;
  4. namespace XCharts.Editor
  5. {
  6. [CustomPropertyDrawer(typeof(ItemStyle), true)]
  7. public class ItemStyleDrawer : BasePropertyDrawer
  8. {
  9. public override string ClassName { get { return "ItemStyle"; } }
  10. public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
  11. {
  12. base.OnGUI(pos, prop, label);
  13. if (MakeComponentFoldout(prop, "m_Show", false))
  14. {
  15. ++EditorGUI.indentLevel;
  16. PropertyField(prop, "m_Color");
  17. PropertyField(prop, "m_Color0");
  18. PropertyField(prop, "m_ToColor");
  19. PropertyField(prop, "m_ToColor2");
  20. PropertyField(prop, "m_MarkColor");
  21. PropertyField(prop, "m_BackgroundColor");
  22. PropertyField(prop, "m_BackgroundWidth");
  23. PropertyField(prop, "m_CenterColor");
  24. PropertyField(prop, "m_CenterGap");
  25. PropertyField(prop, "m_BorderWidth");
  26. PropertyField(prop, "m_BorderGap");
  27. PropertyField(prop, "m_BorderColor");
  28. PropertyField(prop, "m_BorderColor0");
  29. PropertyField(prop, "m_BorderToColor");
  30. PropertyField(prop, "m_Opacity");
  31. PropertyField(prop, "m_ItemMarker");
  32. PropertyField(prop, "m_ItemFormatter");
  33. PropertyField(prop, "m_NumericFormatter");
  34. PropertyListField(prop, "m_CornerRadius", true);
  35. --EditorGUI.indentLevel;
  36. }
  37. }
  38. }
  39. }