ScrollMenuDlg.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using ShadowStudio.Model;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. using UnityEngine;
  7. using UnityEngine.UI;
  8. using XRTool.WorldUI;
  9. namespace XRTool.UI
  10. {
  11. /// <summary>
  12. /// 滑动菜单列表
  13. /// </summary>
  14. public class ScrollMenuDlg : MonoBehaviour
  15. {
  16. private XRScrollRect scroll;
  17. public ScrollConf scrollConf;
  18. /// <summary>
  19. /// 选中的选项
  20. /// </summary>
  21. public event Action<IteamConf> OnSelectIteam;
  22. /// <summary>
  23. ///
  24. /// </summary>
  25. private void Start()
  26. {
  27. scroll = GetComponent<XRScrollRect>();
  28. if (scroll && scrollConf)
  29. {
  30. scrollConf.InitData(scroll);
  31. scroll.InitData(scrollConf.iteamConfs.Count, scrollConf.showCount,
  32. scrollConf.cellSize, scrollConf.cellSpace, scrollConf.iteamPrefab);
  33. }
  34. }
  35. /// <summary>
  36. /// 资源的下载
  37. /// </summary>
  38. /// <param name="artList"></param>
  39. public void SetData(List<ArtInfo> artList)
  40. {
  41. }
  42. }
  43. }