INestedView.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using UnityEngine;
  2. using XGame.Framework.Interfaces;
  3. namespace XGame.Framework.UI
  4. {
  5. /// <summary>
  6. /// 嵌套UI
  7. /// </summary>
  8. public interface INestedView : IActiveable
  9. {
  10. public Vector3 LocalPosition { get; set; }
  11. public Vector3 Position { get; set; }
  12. public Vector3 Rotation { get; set; }
  13. }
  14. /// <summary>
  15. /// 框架用INestedView接口
  16. /// </summary>
  17. public interface INestedInternal : INestedView
  18. {
  19. IUINested Nested { get; }
  20. /// <summary>
  21. /// 初始化
  22. /// </summary>
  23. /// <param name="context"></param>
  24. /// <param name="nested"></param>
  25. /// <param name="isStatic">是否是静态的(其他预制的子节点)</param>
  26. void Init(UIContext context, IUINested nested, bool isStatic);
  27. /// <summary>
  28. /// 父节点显示时尝试激活子节点
  29. /// </summary>
  30. /// <param name="intent"></param>
  31. void EnableByParent(object intent = null);
  32. /// <summary>
  33. /// 父节点隐藏时尝试隐藏子节点
  34. /// </summary>
  35. void DisableByParent();
  36. }
  37. }