暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

MarqueeStyle.cs 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace XCharts.Runtime
  5. {
  6. /// <summary>
  7. /// Marquee style. It can be used for the DataZoom component.
  8. /// 选取框样式。可用于DataZoom组件。
  9. /// </summary>
  10. [Since("v3.5.0")]
  11. [System.Serializable]
  12. public class MarqueeStyle : ChildComponent
  13. {
  14. [SerializeField][Since("v3.5.0")] private bool m_Apply = false;
  15. [SerializeField][Since("v3.5.0")] private bool m_RealRect = false;
  16. [SerializeField][Since("v3.5.0")] private AreaStyle m_AreaStyle = new AreaStyle();
  17. [SerializeField][Since("v3.5.0")] private LineStyle m_LineStyle = new LineStyle();
  18. protected Action<DataZoom> m_OnStart;
  19. protected Action<DataZoom> m_OnGoing;
  20. protected Action<DataZoom> m_OnEnd;
  21. /// <summary>
  22. /// The area style of marquee.
  23. /// |选取框区域填充样式。
  24. /// </summary>
  25. public AreaStyle areaStyle { get { return m_AreaStyle; } set { m_AreaStyle = value; } }
  26. /// <summary>
  27. /// The line style of marquee border.
  28. /// |选取框区域边框样式。
  29. /// </summary>
  30. public LineStyle lineStyle { get { return m_LineStyle; } set { m_LineStyle = value; } }
  31. /// <summary>
  32. /// Check whether the scope is applied to the DataZoom.
  33. /// If this parameter is set to true, the range after the selection is complete is the DataZoom selection range.
  34. /// |选取框范围是否应用到DataZoom上。当为true时,框选结束后的范围即为DataZoom的选择范围。
  35. /// </summary>
  36. public bool apply { get { return m_Apply; } set { m_Apply = value; } }
  37. /// <summary>
  38. /// Whether to select the actual box selection area. When true,
  39. /// the actual range between the mouse's actual point and the end point is used as the box selection area.
  40. /// |是否选取实际框选区域。当为true时,以鼠标的其实点和结束点间的实际范围作为框选区域。
  41. /// </summary>
  42. public bool realRect { get { return m_RealRect; } set { m_RealRect = value; } }
  43. /// <summary>
  44. /// Customize the callback to the start of the selection of the checkbox.
  45. /// |自定义选取框开始选取时的回调。
  46. /// </summary>
  47. public Action<DataZoom> onStart { set { m_OnStart = value; } get { return m_OnStart; } }
  48. /// <summary>
  49. /// Custom checkboxes select ongoing callbacks.
  50. /// |自定义选取框选取进行时的回调。
  51. /// </summary>
  52. public Action<DataZoom> onGoing { set { m_OnStart = value; } get { return m_OnStart; } }
  53. /// <summary>
  54. /// Customize the callback at the end of the selection.
  55. /// |自定义选取框结束选取时的回调。
  56. /// </summary>
  57. public Action<DataZoom> onEnd { set { m_OnEnd = value; } get { return m_OnEnd; } }
  58. }
  59. }