UIManager.OpenUIFormInfo.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //------------------------------------------------------------
  2. // Game Framework
  3. // Copyright © 2013-2021 loyalsoft. All rights reserved.
  4. // Homepage: http://www.game7000.com/
  5. // Feedback: http://www.game7000.com/
  6. //------------------------------------------------------------
  7. namespace GameFramework.UI
  8. {
  9. internal sealed partial class UIManager : GameFrameworkModule, IUIManager
  10. {
  11. private sealed class OpenUIFormInfo : IReference
  12. {
  13. private int m_SerialId;
  14. private UIGroup m_UIGroup;
  15. private bool m_PauseCoveredUIForm;
  16. private object m_UserData;
  17. public OpenUIFormInfo()
  18. {
  19. m_SerialId = 0;
  20. m_UIGroup = null;
  21. m_PauseCoveredUIForm = false;
  22. m_UserData = null;
  23. }
  24. public int SerialId
  25. {
  26. get
  27. {
  28. return m_SerialId;
  29. }
  30. }
  31. public UIGroup UIGroup
  32. {
  33. get
  34. {
  35. return m_UIGroup;
  36. }
  37. }
  38. public bool PauseCoveredUIForm
  39. {
  40. get
  41. {
  42. return m_PauseCoveredUIForm;
  43. }
  44. }
  45. public object UserData
  46. {
  47. get
  48. {
  49. return m_UserData;
  50. }
  51. }
  52. public static OpenUIFormInfo Create(int serialId, UIGroup uiGroup, bool pauseCoveredUIForm, object userData)
  53. {
  54. OpenUIFormInfo openUIFormInfo = ReferencePool.Acquire<OpenUIFormInfo>();
  55. openUIFormInfo.m_SerialId = serialId;
  56. openUIFormInfo.m_UIGroup = uiGroup;
  57. openUIFormInfo.m_PauseCoveredUIForm = pauseCoveredUIForm;
  58. openUIFormInfo.m_UserData = userData;
  59. return openUIFormInfo;
  60. }
  61. public void Clear()
  62. {
  63. m_SerialId = 0;
  64. m_UIGroup = null;
  65. m_PauseCoveredUIForm = false;
  66. m_UserData = null;
  67. }
  68. }
  69. }
  70. }