UI_Panel.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /** This is an automatically generated class by FairyGUI. Please do not modify it. **/
  2. using FairyGUI;
  3. namespace UI.ActivityAFuGift
  4. {
  5. public partial class UI_Panel
  6. {
  7. public GComponent target;
  8. public UI_scrollPane m_scrollPane;
  9. public const string URL = "ui://f3o25i6ljm6kn";
  10. public const string PACKAGE_NAME = "ActivityAFuGift";
  11. public const string RES_NAME = "Panel";
  12. private static UI_Panel _proxy;
  13. public static UI_Panel Create(GObject gObject = null)
  14. {
  15. var ui = new UI_Panel();
  16. if(gObject == null)
  17. ui.target = (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
  18. else
  19. ui.target = (GComponent)gObject;
  20. ui.Init(ui.target);
  21. return ui;
  22. }
  23. public static UI_Panel Proxy(GObject gObject = null)
  24. {
  25. if(_proxy == null)
  26. {
  27. _proxy = new UI_Panel();
  28. }
  29. var ui = _proxy;
  30. if(gObject == null)
  31. ui.target = (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
  32. else
  33. ui.target = (GComponent)gObject;
  34. ui.Init(ui.target);
  35. return ui;
  36. }
  37. public static void ProxyEnd()
  38. {
  39. if (_proxy != null)
  40. {
  41. _proxy.Dispose();
  42. }
  43. }
  44. public static void ClearProxy()
  45. {
  46. ProxyEnd();
  47. _proxy = null;
  48. }
  49. private void Init(GComponent comp)
  50. {
  51. m_scrollPane = (UI_scrollPane)UI_scrollPane.Create(comp.GetChild("scrollPane"));
  52. }
  53. public void Dispose(bool disposeTarget = false)
  54. {
  55. m_scrollPane.Dispose();
  56. m_scrollPane = null;
  57. if(disposeTarget && target != null)
  58. {
  59. target.RemoveFromParent();
  60. target.Dispose();
  61. }
  62. target = null;
  63. }
  64. }
  65. }