FashionShowHomePage.cs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. using UnityEngine.UI;
  4. public class FashionShowHomePage : Regist
  5. {
  6. #region Config
  7. private static Text HomeTabButtonText;
  8. private static Text CuteTabButtonText;
  9. private static Text GraceTabButtonText;
  10. private static Text VividTabButtonText;
  11. private static Text SimpleTabButtonText;
  12. private static Text GloryTabButtonText;
  13. private static Text MineTabButtonText;
  14. private static Text RecommendTitle;
  15. private static Text ShareTxt;
  16. private static Button ShareButton;
  17. private static Button Return;
  18. private static Button HomeTabButton;
  19. private static Button CuteTabButton;
  20. private static Button GraceTabButton;
  21. private static Button VividTabButton;
  22. private static Button SimpleTabButton;
  23. private static Button GloryTabButton;
  24. private static Button MineTabButton;
  25. private static Image HomeBubble;
  26. private static Image CuteBubble;
  27. private static Image GraceBubble;
  28. private static Image VividBubble;
  29. private static Image SimpleBubble;
  30. private static Image GloryBubble;
  31. private static Image MineBubble;
  32. private static VirtualScrollRectPlus HomeScrollRect;
  33. private static VirtualScrollRectPlus CuteScrollRect;
  34. private static VirtualScrollRectPlus GraceScrollRect;
  35. private static VirtualScrollRectPlus VividScrollRect;
  36. private static VirtualScrollRectPlus SimpleScrollRect;
  37. private static VirtualScrollRectPlus GloryScrollRect;
  38. private static VirtualScrollRectPlus MineScrollRect;
  39. private static int currentDataIndex;
  40. private static int currentPage;
  41. private static bool requesting;
  42. private static ShowListHttp http;
  43. private static FashionShowType currentType;
  44. //private static Button CurrentTabButton;
  45. private static VirtualScrollRectPlus CurrentScrollRect;
  46. private static List<GetFashionShowData> CurrentDatas = new List<GetFashionShowData>();
  47. private static Button OpenHomePageButton;
  48. private static Transform Panel;
  49. private static Transform SidePanel;
  50. private static List<Button> TabButtons = new List<Button>();
  51. private static List<Image> TabBubbles = new List<Image>();
  52. private static List<VirtualScrollRectPlus> ScrollRects = new List<VirtualScrollRectPlus>();
  53. private static List<GetFashionShowData> HomeDatas = new List<GetFashionShowData>();
  54. private static List<GetFashionShowData> CuteDatas = new List<GetFashionShowData>();
  55. private static List<GetFashionShowData> GraceDatas = new List<GetFashionShowData>();
  56. private static List<GetFashionShowData> VividDatas = new List<GetFashionShowData>();
  57. private static List<GetFashionShowData> SimpleDatas = new List<GetFashionShowData>();
  58. private static List<GetFashionShowData> GloryDatas = new List<GetFashionShowData>();
  59. private static List<GetFashionShowData> MineDatas = new List<GetFashionShowData>();
  60. private static List<List<GetFashionShowData>> TabDatasList = new List<List<GetFashionShowData>>();
  61. private static List<FashionShowCloseBox> Boxes = new List<FashionShowCloseBox>();
  62. #endregion
  63. public override void RegistReference()
  64. {
  65. HomeTabButtonText = ResourceManager.Get<Text>(CanvasLabel.Pi_HomeTabButtonText);
  66. CuteTabButtonText = ResourceManager.Get<Text>(CanvasLabel.Pi_CuteTabButtonText);
  67. GraceTabButtonText = ResourceManager.Get<Text>(CanvasLabel.Pi_GraceTabButtonText);
  68. VividTabButtonText = ResourceManager.Get<Text>(CanvasLabel.Pi_VividTabButtonText);
  69. SimpleTabButtonText = ResourceManager.Get<Text>(CanvasLabel.Pi_SimpleTabButtonText);
  70. GloryTabButtonText = ResourceManager.Get<Text>(CanvasLabel.Pi_GloryTabButtonText);
  71. MineTabButtonText = ResourceManager.Get<Text>(CanvasLabel.Pi_MineTabButtonText);
  72. RecommendTitle = ResourceManager.Get<Text>(CanvasLabel.Pi_RecommendTitle);
  73. ShareTxt = ResourceManager.Get<Text>(CanvasLabel.Pi_Share);
  74. ShareButton = ResourceManager.Get<Button>(CanvasLabel.Pi_Share);
  75. Return = ResourceManager.Get<Button>(CanvasLabel.Pi_Return);
  76. HomeTabButton = ResourceManager.Get<Button>(CanvasLabel.Pi_HomeTabButton);
  77. CuteTabButton = ResourceManager.Get<Button>(CanvasLabel.Pi_CuteTabButton);
  78. GraceTabButton = ResourceManager.Get<Button>(CanvasLabel.Pi_GraceTabButton);
  79. VividTabButton = ResourceManager.Get<Button>(CanvasLabel.Pi_VividTabButton);
  80. SimpleTabButton = ResourceManager.Get<Button>(CanvasLabel.Pi_SimpleTabButton);
  81. GloryTabButton = ResourceManager.Get<Button>(CanvasLabel.Pi_GloryTabButton);
  82. MineTabButton = ResourceManager.Get<Button>(CanvasLabel.Pi_MineTabButton);
  83. HomeBubble = ResourceManager.Get<Image>(CanvasLabel.Pi_HomeTabBubble);
  84. CuteBubble = ResourceManager.Get<Image>(CanvasLabel.Pi_CuteTabBubble);
  85. GraceBubble = ResourceManager.Get<Image>(CanvasLabel.Pi_GraceTabBubble);
  86. VividBubble = ResourceManager.Get<Image>(CanvasLabel.Pi_VividTabBubble);
  87. SimpleBubble = ResourceManager.Get<Image>(CanvasLabel.Pi_SimpleTabBubble);
  88. GloryBubble = ResourceManager.Get<Image>(CanvasLabel.Pi_GloryTabBubble);
  89. MineBubble = ResourceManager.Get<Image>(CanvasLabel.Pi_MineTabBubble);
  90. HomeScrollRect = ResourceManager.Get<VirtualScrollRectPlus>(CanvasLabel.Pi_HomeScrollRect);
  91. CuteScrollRect = ResourceManager.Get<VirtualScrollRectPlus>(CanvasLabel.Pi_CuteScrollRect);
  92. GraceScrollRect = ResourceManager.Get<VirtualScrollRectPlus>(CanvasLabel.Pi_GraceScrollRect);
  93. VividScrollRect = ResourceManager.Get<VirtualScrollRectPlus>(CanvasLabel.Pi_VividScrollRect);
  94. SimpleScrollRect = ResourceManager.Get<VirtualScrollRectPlus>(CanvasLabel.Pi_SimpleScrollRect);
  95. GloryScrollRect = ResourceManager.Get<VirtualScrollRectPlus>(CanvasLabel.Pi_GloryScrollRect);
  96. MineScrollRect = ResourceManager.Get<VirtualScrollRectPlus>(CanvasLabel.Pi_MineScrollRect);
  97. Panel = ResourceManager.Get(CanvasLabel.Pi_FashionShowHomePanel);
  98. SidePanel = ResourceManager.Get(CanvasLabel.Pi_FashionShowHomeSidePanel);
  99. OpenHomePageButton = ResourceManager.Get<Button>(CanvasLabel.C_FashionShowButton);
  100. //CurrentTabButton = HomeTabButton;
  101. TabButtons.Add(HomeTabButton);
  102. TabButtons.Add(CuteTabButton);
  103. TabButtons.Add(GraceTabButton);
  104. TabButtons.Add(VividTabButton);
  105. TabButtons.Add(SimpleTabButton);
  106. TabButtons.Add(GloryTabButton);
  107. TabButtons.Add(MineTabButton);
  108. TabBubbles.Add(HomeBubble);
  109. TabBubbles.Add(CuteBubble);
  110. TabBubbles.Add(GraceBubble);
  111. TabBubbles.Add(VividBubble);
  112. TabBubbles.Add(SimpleBubble);
  113. TabBubbles.Add(GloryBubble);
  114. TabBubbles.Add(MineBubble);
  115. ScrollRects.Add(HomeScrollRect);
  116. ScrollRects.Add(CuteScrollRect);
  117. ScrollRects.Add(GraceScrollRect);
  118. ScrollRects.Add(VividScrollRect);
  119. ScrollRects.Add(SimpleScrollRect);
  120. ScrollRects.Add(GloryScrollRect);
  121. ScrollRects.Add(MineScrollRect);
  122. TabDatasList.Add(HomeDatas);
  123. TabDatasList.Add(CuteDatas);
  124. TabDatasList.Add(GraceDatas);
  125. TabDatasList.Add(VividDatas);
  126. TabDatasList.Add(SimpleDatas);
  127. TabDatasList.Add(GloryDatas);
  128. TabDatasList.Add(MineDatas);
  129. Panel.CreateTweenVec2D(ResourceManager.Get(CanvasLabel.Pi_FashionShowHomePanelPosition).position, 0.5f, false, false, true, Curve.EaseOutQuad);
  130. SidePanel.CreateTweenVec2D(ResourceManager.Get(CanvasLabel.Pi_FashionShowHomePanelPosition).position, 0.5f, false, false, true, Curve.EaseOutQuad);
  131. HomeTabButton.CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
  132. CuteTabButton.CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
  133. GraceTabButton.CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
  134. VividTabButton.CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
  135. SimpleTabButton.CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
  136. GloryTabButton.CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
  137. MineTabButton.CreateTweenScale(new Vector3(1, 1, 1), new Vector3(1.1f, 1.1f, 1.1f), 0.25f, true, true, Curve.EaseOutQuad);
  138. LanguageManager.Add(HomeTabButtonText, new MulLanStr(LanguageLabel.UI__Pi_HomePage));
  139. LanguageManager.Add(CuteTabButtonText, new MulLanStr(LanguageLabel.UI__Pg_Cute));
  140. LanguageManager.Add(GraceTabButtonText, new MulLanStr(LanguageLabel.UI__Pg_Grace));
  141. LanguageManager.Add(VividTabButtonText, new MulLanStr(LanguageLabel.UI__Pg_Vivid));
  142. LanguageManager.Add(GloryTabButtonText, new MulLanStr(LanguageLabel.UI__Pg_Glory));
  143. LanguageManager.Add(SimpleTabButtonText, new MulLanStr(LanguageLabel.UI__Pg_Simple));
  144. LanguageManager.Add(MineTabButtonText, new MulLanStr(LanguageLabel.UI__Pg_Mine));
  145. LanguageManager.Add(RecommendTitle, new MulLanStr(LanguageLabel.UI__Pi_Title));
  146. LanguageManager.Add(ShareTxt, new MulLanStr(LanguageLabel.UI__Pi_Share));
  147. Return.onClick.AddListener(OnCloseButtonClick);
  148. ShareButton.onClick.AddListener(LeaveToDressRoom);
  149. OpenHomePageButton.onClick.AddListener(OnOpenButtonClick);
  150. HomeTabButton.onClick.AddListener(() => OnTabButtonClick(HomeTabButton));
  151. CuteTabButton.onClick.AddListener(() => OnTabButtonClick(CuteTabButton));
  152. GraceTabButton.onClick.AddListener(() => OnTabButtonClick(GraceTabButton));
  153. VividTabButton.onClick.AddListener(() => OnTabButtonClick(VividTabButton));
  154. SimpleTabButton.onClick.AddListener(() => OnTabButtonClick(SimpleTabButton));
  155. GloryTabButton.onClick.AddListener(() => OnTabButtonClick(GloryTabButton));
  156. MineTabButton.onClick.AddListener(() => OnTabButtonClick(MineTabButton));
  157. HomeScrollRect.Init(1, 1000000);
  158. CuteScrollRect.Init(1, 1000000);
  159. GraceScrollRect.Init(1, 1000000);
  160. SimpleScrollRect.Init(1, 1000000);
  161. VividScrollRect.Init(1, 1000000);
  162. GloryScrollRect.Init(1, 1000000);
  163. MineScrollRect.Init(1, 1000000);
  164. HomeScrollRect.OnSaveItem += OnSaveItem;
  165. HomeScrollRect.OnGetNextItem += OnGetNextItem;
  166. HomeScrollRect.OnGetPreviousItem += OnGetPreviousItem;
  167. CuteScrollRect.OnSaveItem += OnSaveItem;
  168. CuteScrollRect.OnGetNextItem += OnGetNextItem;
  169. CuteScrollRect.OnGetPreviousItem += OnGetPreviousItem;
  170. GraceScrollRect.OnSaveItem += OnSaveItem;
  171. GraceScrollRect.OnGetNextItem += OnGetNextItem;
  172. GraceScrollRect.OnGetPreviousItem += OnGetPreviousItem;
  173. SimpleScrollRect.OnSaveItem += OnSaveItem;
  174. SimpleScrollRect.OnGetNextItem += OnGetNextItem;
  175. SimpleScrollRect.OnGetPreviousItem += OnGetPreviousItem;
  176. VividScrollRect.OnSaveItem += OnSaveItem;
  177. VividScrollRect.OnGetNextItem += OnGetNextItem;
  178. VividScrollRect.OnGetPreviousItem += OnGetPreviousItem;
  179. GloryScrollRect.OnSaveItem += OnSaveItem;
  180. GloryScrollRect.OnGetNextItem += OnGetNextItem;
  181. GloryScrollRect.OnGetPreviousItem += OnGetPreviousItem;
  182. MineScrollRect.OnSaveItem += OnSaveItem;
  183. MineScrollRect.OnGetNextItem += OnGetNextItem;
  184. MineScrollRect.OnGetPreviousItem += OnGetPreviousItem;
  185. }
  186. public static void ShowPanel()
  187. {
  188. TweenRoot tween = Panel.TweenForVec();
  189. tween.AddEventOnetime
  190. (
  191. EventType.ForwardFinish,
  192. () =>
  193. {
  194. ResourceManager.SetActive(ResourceLabel.Garden, false);
  195. Player.InDressRoom = true;
  196. }
  197. );
  198. ResourceManager.Get(CanvasLabel.C_Main).TweenBacCG();
  199. foreach (var tabButton in TabButtons)
  200. {
  201. tabButton.GetTweenScale().InOrigin = true;
  202. }
  203. OnTabButtonClick(HomeTabButton);
  204. }
  205. public static void HidePanel()
  206. {
  207. GardenManager.RetrieveAllElf();
  208. TweenRoot tween = Panel.GetTweenVec();
  209. tween.AddEventOnetime
  210. (
  211. EventType.BackwardStart,
  212. () =>
  213. {
  214. ResourceManager.SetActive(ResourceLabel.Garden, true);
  215. Player.InDressRoom = false;
  216. }
  217. );
  218. tween.AddEventOnetime
  219. (
  220. EventType.BackwardFinish, () =>
  221. {
  222. ResourceManager.Get(CanvasLabel.C_Main).TweenForCG();
  223. }
  224. );
  225. tween.StartBackward();
  226. }
  227. public static void LeaveToDressRoom()
  228. {
  229. GardenManager.RetrieveAllElf();
  230. ResourceManager.SetActive(ResourceLabel.Garden, true);
  231. TweenRoot tween = Panel.GetTweenVec();
  232. tween.StartBackward();
  233. ResourceManager.Get<Button>(CanvasLabel.C_DressRoom).onClick.Invoke();
  234. }
  235. public static TweenRoot ShowSidePanel()
  236. {
  237. return SidePanel.TweenForVec();
  238. }
  239. public static TweenRoot HideSidePanel()
  240. {
  241. return SidePanel.TweenBacVec();
  242. }
  243. private static void OnOpenButtonClick()
  244. {
  245. //AudioManager.PlayClip(ResourceLabel.BtnClip);
  246. ShowPanel();
  247. }
  248. private static void OnCloseButtonClick()
  249. {
  250. AudioManager.PlayClip(ResourceLabel.BtnClip);
  251. HidePanel();
  252. }
  253. private static void OnTabButtonClick(Button button)
  254. {
  255. int index = TabButtons.IndexOf(button);
  256. //Debug.Log(index);
  257. requesting = false;
  258. currentDataIndex = 0;
  259. currentPage = 0;
  260. currentType = (FashionShowType) index;
  261. //CurrentTabButton = button;
  262. CurrentScrollRect = ScrollRects[index];
  263. CurrentDatas = TabDatasList[index];
  264. if (http != null)
  265. {
  266. http.disable = true;
  267. }
  268. foreach (var tabBubble in TabBubbles)
  269. {
  270. tabBubble.SetActive(false);
  271. }
  272. TabBubbles[index].SetActive(true);
  273. AudioManager.PlayClip(ResourceLabel.BtnClip);
  274. for (int i = 0; i < TabButtons.Count; i++)
  275. {
  276. //Debug.Log(TabButtons[i].transform.name);
  277. TabButtons[i].transform.SetSiblingIndex(i);
  278. TabButtons[i].TweenBacScale();
  279. TabButtons[i].interactable = true;
  280. //if (TabButtons[i].GetTweenScale().InPause)
  281. //{
  282. // TabButtons[i].GetTweenScale().Resume();
  283. //}
  284. ScrollRects[i].transform.parent.SetActive(false);
  285. }
  286. //Debug.Log(button.transform.name);
  287. button.GetTweenScale().Pause();
  288. button.transform.SetAsLastSibling();
  289. button.TweenForScale();
  290. button.interactable = false;
  291. CurrentScrollRect.transform.parent.SetActive(true);
  292. CurrentScrollRect.SaveAllChild();
  293. for (int i = 0; i < Boxes.Count; i++)
  294. {
  295. DestroyImmediate(Boxes[i].gameObject);
  296. }
  297. Boxes = new List<FashionShowCloseBox>();
  298. for (int i = 0; i < CurrentDatas.Count; i++)
  299. {
  300. CurrentDatas.RemoveAt(i--);
  301. }
  302. RefreshCurrentTabPage();
  303. }
  304. private static void RefreshCurrentTabPage()
  305. {
  306. if (CurrentScrollRect.content.transform.childCount > 0) return;
  307. if (CurrentDatas.Count == 0)
  308. {
  309. CurrentScrollRect.NextHorizontalPage();
  310. }
  311. else
  312. {
  313. for (int i = 0; i < 2; i++) CurrentScrollRect.NextHorizontalPage();
  314. }
  315. }
  316. private static FashionShowCloseBox GetAvailableBox()
  317. {
  318. foreach (var box in Boxes)
  319. {
  320. if (box.HaveUnusedCell()) return box;
  321. }
  322. return null;
  323. }
  324. private static void OnSaveItem(int index, VirtualScrollRectItem item)
  325. {
  326. //FashionShowCloseBox box = (FashionShowCloseBox)item;
  327. //Boxes.Remove(box);
  328. //DestroyImmediate(box.gameObject);
  329. //FashionShowCloseBox box = (FashionShowCloseBox) item;
  330. //box.reset();
  331. //Boxes.Remove(box);
  332. //ResourceManager.Save(item);
  333. //Debug.Log(Boxes.Count);
  334. }
  335. private static VirtualScrollRectItem OnGetNextItem(int index)
  336. {
  337. //Debug.LogWarning(Boxes.Count);
  338. //Debug.Log(CurrentDatas.Count + " " + currentDataIndex);
  339. if (CurrentDatas.Count > currentDataIndex)
  340. {
  341. FashionShowCloseBox closeBox = GetAvailableBox();
  342. //Debug.Log(closeBox);
  343. if (closeBox == null)
  344. {
  345. closeBox = ResourceManager.Get(FashionShowCloseBoxLabel.FashionShowCloseBox, Folder.UI, false, CurrentScrollRect.content, false, ObjType.FashionShowCloseBox, typeof(FashionShowCloseBox)).GetComponent<FashionShowCloseBox>();
  346. Boxes.Add(closeBox);
  347. closeBox.Init();
  348. closeBox.SetNextCell(CurrentDatas[currentDataIndex++]);
  349. if (closeBox.HaveUnusedCell())
  350. {
  351. CurrentScrollRect.NextHorizontalPage();
  352. }
  353. return closeBox;
  354. }
  355. else
  356. {
  357. closeBox.SetNextCell(CurrentDatas[currentDataIndex++]);
  358. if (closeBox.HaveUnusedCell())
  359. {
  360. CurrentScrollRect.NextHorizontalPage();
  361. }
  362. return null;
  363. }
  364. }
  365. else
  366. {
  367. GetShowList();
  368. return null;
  369. }
  370. }
  371. private static void GetShowList()
  372. {
  373. if (requesting)
  374. {
  375. return;
  376. }
  377. requesting = true;
  378. if (currentType == FashionShowType.Mine)
  379. {
  380. http = ShowListHttp.Get
  381. (
  382. HttpManager.GetPlayerId(), HttpManager.GetPlayerId(), currentPage,
  383. OnGetShowListSucceed, OnGetShowListFailed
  384. );
  385. }
  386. else
  387. {
  388. http = ShowListHttp.Get
  389. (
  390. HttpManager.GetPlayerId(), currentPage, currentType,
  391. OnGetShowListSucceed, OnGetShowListFailed
  392. );
  393. }
  394. }
  395. private static void OnGetShowListSucceed(object obj)
  396. {
  397. requesting = false;
  398. currentPage++;
  399. List<GetFashionShowData> datas = (List<GetFashionShowData>) obj;
  400. //Debug.Log(datas.Count);
  401. RefreshCurrentTabPage();
  402. for (int i = 0; i < datas.Count; i++)
  403. {
  404. GetFashionShowData data = datas[i];
  405. CurrentDatas.AddUnique(data, (showData0, showData1) => showData0.showId == showData1.showId);
  406. }
  407. //Debug.Log(CurrentDatas.Count);
  408. }
  409. private static void OnGetShowListFailed()
  410. {
  411. requesting = false;
  412. }
  413. private static VirtualScrollRectItem OnGetPreviousItem(int index)
  414. {
  415. if (index >= 0)
  416. {
  417. FashionShowCloseBox closeBox = GetAvailableBox();
  418. if (closeBox == null)
  419. {
  420. closeBox = ResourceManager.Get(FashionShowCloseBoxLabel.FashionShowCloseBox, Folder.UI, false, CurrentScrollRect.content, false, ObjType.FashionShowCloseBox, typeof(FashionShowCloseBox)).GetComponent<FashionShowCloseBox>();
  421. Boxes.Add(closeBox);
  422. closeBox.reset();
  423. closeBox.SetNextCell(CurrentDatas[index]);
  424. if (closeBox.HaveUnusedCell())
  425. {
  426. CurrentScrollRect.PreviousHorizontalPage();
  427. }
  428. return closeBox;
  429. }
  430. else
  431. {
  432. closeBox.SetNextCell(CurrentDatas[index]);
  433. if (closeBox.HaveUnusedCell())
  434. {
  435. CurrentScrollRect.PreviousHorizontalPage();
  436. }
  437. return null;
  438. }
  439. }
  440. else
  441. {
  442. return null;
  443. }
  444. }
  445. }