DressUpView.cs 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111
  1. using UI.DressUp;
  2. using FairyGUI;
  3. using UnityEngine;
  4. using System.Collections.Generic;
  5. using ET;
  6. namespace GFGGame
  7. {
  8. public class DressUpView : BaseView
  9. {
  10. public const int MAX_MEMORY_STEP = 20;//最大记录步数
  11. public const int BOTTOM_BLANK = 20;
  12. public const int RIGHT_BLANK = 36;
  13. private const int SORT_BY_HIGH_RARITY = 0;
  14. private const int SORT_BY_LOW_RARITY = 1;
  15. private const int SORT_BY_GET_TIME = 2;
  16. private UI_DressUpUI _ui;
  17. private float listType1X = 0;
  18. private float partsListX = 0;
  19. private float partsListScrollingPosY = 0;
  20. private DressUpListType currentListType;
  21. /// <summary>
  22. /// 子菜单列表
  23. /// </summary>
  24. private int[] _currentList2;
  25. private GameObject _scenePrefab;
  26. private GameObject _sceneObject;
  27. private List<int> _currentList3 = new List<int>();
  28. private List<int> _currentList4 = new List<int>();
  29. private int _currentMenuType;
  30. private int _currentSuitId;
  31. private bool _isNormalSuitType = false;//当前套装部件列表是否为普通动作列表
  32. private int _rarityIndex = SORT_BY_HIGH_RARITY;
  33. private UI_TypeItem listTypeItem_FreedomDress;
  34. private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
  35. private int currentIndex = 0;
  36. public override void Dispose()
  37. {
  38. if (_sceneObject != null)
  39. {
  40. GameObject.Destroy(_sceneObject);
  41. _sceneObject = null;
  42. }
  43. for (int i = 0; i < _listLongPress.Count; i++)
  44. {
  45. _listLongPress[i].Dispose();
  46. }
  47. _listLongPress.Clear();
  48. if (_ui != null)
  49. {
  50. _ui.Dispose();
  51. _ui = null;
  52. }
  53. base.Dispose();
  54. }
  55. protected override void Init()
  56. {
  57. base.Init();
  58. packageName = UI_DressUpUI.PACKAGE_NAME;
  59. _ui = UI_DressUpUI.Create();
  60. viewCom = _ui.target;
  61. isfullScreen = true;
  62. _scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneDressUp"));
  63. }
  64. protected override void OnInit()
  65. {
  66. base.OnInit();
  67. _ui.m_btnLastStep.visible = true;
  68. _ui.m_btnNextStep.visible = true;
  69. _ui.m_btnSearch.visible = true;
  70. _ui.m_btnPhoto.visible = true;
  71. _ui.m_btnAction.visible = false;
  72. // _ui.m_comboBox.items = new string[] { "我的套装一", "我的套装二", "我的套装三", "我的套装四", "我的套装五", "我的套装六" };
  73. _ui.m_partsList.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
  74. _ui.m_partsListSearch.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
  75. InitLists();
  76. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  77. _ui.m_btnHome.onClick.Add(OnClickBtnHome);
  78. _ui.m_btnLastStep.onClick.Add(OnClickBtnLastStep);
  79. _ui.m_btnNextStep.onClick.Add(OnClickBtnNextStep);
  80. _ui.m_comboBox.onChanged.Add(OnComboBoxChanged);
  81. _ui.m_comListType1.m_listType.onClickItem.Add(OnClickListType1Item);
  82. _ui.m_comListType2.m_listType.onClickItem.Add(OnClickListType2Item);
  83. // _ui.m_partsList.m_list.SetVirtual();
  84. // _ui.m_partsList.m_list.onClickItem.Add(OnClickPartsListItem);
  85. _ui.m_partsList2.m_list.onClickItem.Add(OnClickSuitPartsListItem);
  86. // _ui.m_partsListSearch.m_list.onClickItem.Add(OnClickPartsListItem);
  87. _ui.m_touchPad.onClick.Add(OnTouchPad);
  88. _ui.m_btnDelete.onClick.Add(OnClickBtnDelete);
  89. _ui.m_btnSave.onClick.Add(OnClickBtnSave);
  90. _ui.m_partsList.m_comboBoxRarity.onChanged.Add(OnComboBoxRarityChanged);
  91. _ui.m_partsListSearch.m_comboBoxRarity.onChanged.Add(OnSearchComboBoxRarityChanged);
  92. _ui.m_btnAction.onClick.Add(OnClickBtnAction);
  93. _ui.m_btnSearch.onClick.Add(OnClickBtnSearch);
  94. _ui.m_btnNext.onClick.Add(OnClickBtnNext);
  95. _ui.m_btnShow.onClick.Add(OnClickBtnShow);
  96. _ui.m_btnHide.onClick.Add(OnClickBtnHide);
  97. _ui.m_loaShow.onClick.Add(OnClickLoaShow);
  98. _ui.m_btnPhoto.onClick.Add(OnClickBtnPhoto);
  99. _ui.m_partsList2.m_comboBoxRarity.visible = false;
  100. _ui.m_partsList2.m_imgTop.visible = true;
  101. _ui.m_partsList.m_imgTop.visible = false;
  102. }
  103. private void InitLists()
  104. {
  105. _ui.m_comListType2.m_listType.itemRenderer = ListType2Item;
  106. _ui.m_partsList.m_list.itemRenderer = ListPartsItem;
  107. _ui.m_partsList2.m_list.itemRenderer = ListParts2Item;
  108. _ui.m_partsListSearch.m_list.itemRenderer = ListPartsItem;
  109. listType1X = _ui.m_comListType1.target.x;
  110. partsListX = _ui.m_partsList.target.x - _ui.m_partsList.target.width;// - DressUpView.RIGHT_BLANK;
  111. //一级菜单
  112. _ui.m_comListType1.m_listType.itemRenderer = ListType1Item;
  113. _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length;
  114. //_ui.m_comListType1.m_listType1.ResizeToFit(_ui.m_comListType1.m_listType1.numItems);
  115. float maxHeight = _ui.target.height - _ui.m_comListType1.target.y - DressUpView.BOTTOM_BLANK;
  116. if (_ui.m_comListType1.m_listType.height > maxHeight)
  117. {
  118. _ui.m_comListType1.m_listType.height = maxHeight;
  119. }
  120. }
  121. protected override void AddEventListener()
  122. {
  123. base.AddEventListener();
  124. EventAgent.AddEventListener(ConstMessage.CLOSE_PHOTOGRAPHVIEW, UpdateScene);
  125. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
  126. EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
  127. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
  128. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
  129. }
  130. protected override void OnShown()
  131. {
  132. base.OnShown();
  133. if (this.viewData != null)
  134. {
  135. _ui.m_c2.selectedIndex = (int)this.viewData;
  136. }
  137. _rarityIndex = SORT_BY_HIGH_RARITY;
  138. // MusicManager.Instance.Play(ResPathUtil.GetMusicPath(ConstMusicName.DRESS_UP, "mp3"));
  139. _ui.m_comListType1.target.x = _ui.target.width;
  140. _ui.m_comListType2.target.x = _ui.target.width;
  141. _ui.m_partsList.target.x = _ui.target.width;
  142. _ui.m_partsList2.target.x = _ui.target.width;
  143. this.showListType1();
  144. if (_sceneObject == null)
  145. {
  146. _sceneObject = GameObject.Instantiate(_scenePrefab);
  147. }
  148. MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject);
  149. currentIndex = CustomSuitDataManager.currentIndex;
  150. _ui.m_comboBox.items = CustomSuitDataManager.GetSuitPosItems();
  151. _ui.m_comboBox.selectedIndex = currentIndex;
  152. MyDressUpHelper.PutOnSuitSavedByPos(currentIndex);
  153. UpdateStepBtn(true);
  154. Timers.inst.AddUpdate(CheckGuide);
  155. }
  156. protected override void OnHide()
  157. {
  158. base.OnHide();
  159. listTypeItem_FreedomDress = null;
  160. // MusicManager.Instance.Play(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
  161. MyDressUpHelper.dressUpObj.TakeOffAll();
  162. if (_sceneObject != null)
  163. {
  164. GameObject.Destroy(_sceneObject);
  165. _sceneObject = null;
  166. }
  167. _ui.m_c2.selectedIndex = 0;
  168. Reset();
  169. Timers.inst.Remove(CheckGuide);
  170. }
  171. protected override void RemoveEventListener()
  172. {
  173. base.RemoveEventListener();
  174. EventAgent.RemoveEventListener(ConstMessage.CLOSE_PHOTOGRAPHVIEW, UpdateScene);
  175. EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
  176. EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
  177. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
  178. EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
  179. }
  180. private void OnClickBtnBack()
  181. {
  182. Reset();
  183. // this.Hide();
  184. // ViewManager.Show(ViewName.MAINUI_VIEW);
  185. ViewManager.GoBackFrom(typeof(DressUpView).FullName);
  186. }
  187. private void OnClickBtnHome()
  188. {
  189. GameController.GoBackToMainView();
  190. Reset();
  191. }
  192. private void Reset()
  193. {
  194. DressUpMenuItemDataManager.Clear();
  195. MyDressUpHelper.ResetMemory();
  196. }
  197. private void OnClickBtnLastStep()
  198. {
  199. if (!MyDressUpHelper.OnClickBtnLastStep()) return;
  200. UpdateStepBtn(false);
  201. }
  202. private void OnClickBtnNextStep()
  203. {
  204. if (!MyDressUpHelper.OnClickBtnNextStep()) return;
  205. UpdateStepBtn(false);
  206. }
  207. private void OnComboBoxChanged()
  208. {
  209. if (_ui.m_comboBox.selectedIndex == currentIndex) return;
  210. if (CustomSuitDataManager.GetPosType(_ui.m_comboBox.selectedIndex) == MonthCardType.Gold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.Gold))
  211. {
  212. ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_MONTH_CARD, ConstStoreSubId.STORE_MONTH_GOLD_CARD });
  213. _ui.m_comboBox.selectedIndex = currentIndex;
  214. return;
  215. }
  216. if (CustomSuitDataManager.GetPosType(_ui.m_comboBox.selectedIndex) == MonthCardType.BlackGold && !RoleDataManager.CheckIsMonthCardOpenByType(MonthCardType.BlackGold))
  217. {
  218. ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_MONTH_CARD, ConstStoreSubId.STORE_MONTH_BLACK_CARD });
  219. _ui.m_comboBox.selectedIndex = currentIndex;
  220. return;
  221. }
  222. currentIndex = _ui.m_comboBox.selectedIndex;
  223. MyDressUpHelper.PutOnSuitSavedByPos(_ui.m_comboBox.selectedIndex);
  224. UpdateStepBtn(true);
  225. }
  226. private void OnClickListType1Item(EventContext context)
  227. {
  228. GObject typeItem = (GObject)context.data as GObject;
  229. int order = (int)typeItem.data;
  230. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[order - 1];
  231. if (item1.subMenusArr.Length > 0)
  232. {
  233. this.showListType2(item1.subMenusArr);
  234. }
  235. else
  236. {
  237. if (this.showListParts(item1.type) == false)
  238. {
  239. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  240. return;
  241. }
  242. }
  243. this.hideListType1();
  244. UpdateListPartsSelected();
  245. }
  246. private void OnClickListType2Item(EventContext context)
  247. {
  248. GObject typeItem = (GObject)context.data as GObject;
  249. int order = (int)typeItem.data;
  250. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[order - 1];
  251. if (this.showListParts(item2.type) == false)
  252. {
  253. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  254. return;
  255. }
  256. this.hideListType2();
  257. }
  258. private void OnClickPartsListItem(EventContext context)
  259. {
  260. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  261. {
  262. return;
  263. }
  264. int id = (int)(context.sender as GObject).data;
  265. if (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG)
  266. {
  267. partsListScrollingPosY = _ui.m_partsList.m_list.scrollPane.scrollingPosY;
  268. OnBtnNormalClick(context);
  269. }
  270. else if (_currentMenuType == ConstDressUpItemType.DONG_ZUO)
  271. {
  272. MyDressUpHelper.dressUpObj.PutOnOrTakeOffAction(id);
  273. }
  274. else
  275. {
  276. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  277. }
  278. UpdateStepBtn(true, id);
  279. }
  280. private void OnBtnNormalClick(EventContext context)
  281. {
  282. // _isNormalSuitType = true;
  283. GObject gObject = context.sender as GObject;
  284. int suitId = (int)gObject.data;
  285. ShowSuitPartList(suitId, false);
  286. }
  287. private void OnBtnActionClick(EventContext context)
  288. {
  289. // _isNormalSuitType = false;
  290. GObject gObject = context.sender as GObject;
  291. int suitId = (int)gObject.data;
  292. ShowSuitPartList(suitId, true);
  293. }
  294. private void ShowSuitPartList(int suitId, bool showAction)
  295. {
  296. _isNormalSuitType = !showAction;
  297. this.showListParts2(suitId);
  298. this.hideListParts();
  299. if (showAction)
  300. {
  301. MyDressUpHelper.dressUpObj.PutOnSuitCfg(suitId, true);
  302. }
  303. else
  304. {
  305. MyDressUpHelper.dressUpObj.PutOnSuitCfg(suitId, false);
  306. }
  307. UpdateStepBtn(true);
  308. }
  309. private void OnClickSuitPartsListItem(EventContext context)
  310. {
  311. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  312. {
  313. return;
  314. }
  315. GObject listItem = (GObject)context.data as GObject;
  316. int id = (int)listItem.data;
  317. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  318. if (itemCfg != null)
  319. {
  320. if (!DressUpMenuItemDataManager.CheckHasItem(itemCfg.id))
  321. {
  322. PromptController.Instance.ShowFloatTextPrompt("还未获得这件装扮");
  323. return;
  324. }
  325. MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
  326. }
  327. else
  328. {
  329. MyDressUpHelper.dressUpObj.PutOnOrTakeOffAction(id);
  330. }
  331. UpdateStepBtn(true);
  332. // UpdateListSuitPartsSelected();
  333. }
  334. private void UpdateStepBtn(bool isAdd, int suitId = 0)
  335. {
  336. if (isAdd)
  337. {
  338. MyDressUpHelper.AddMemoryDressup();
  339. }
  340. _ui.m_btnLastStep.enabled = MyDressUpHelper.stepIndex > 0;
  341. _ui.m_btnNextStep.enabled = MyDressUpHelper.stepIndex < MyDressUpHelper.dressMemory.Count - 1;
  342. UpdateListPartsSelected(suitId);
  343. UpdateListSuitPartsSelected();
  344. }
  345. private void OnLongPress(EventContext context)
  346. {
  347. LongPressGesture gesture = (LongPressGesture)context.sender;
  348. int itemId = (int)gesture.host.data;
  349. GoodsItemTipsController.ShowItemTips(itemId);
  350. }
  351. private void OnTouchPad()
  352. {
  353. if (this.currentListType == DressUpListType.List4)
  354. {
  355. this.hideListParts2();
  356. this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  357. }
  358. else if (this.currentListType == DressUpListType.List3)
  359. {
  360. if (_currentList2 != null)
  361. {
  362. this.showListType2(_currentList2);
  363. // _ui.m_comListType2.m_listType.numItems = _ui.m_comListType2.m_listType.numItems;
  364. }
  365. else
  366. {
  367. this.showListType1();
  368. }
  369. this.hideListParts();
  370. }
  371. else if (this.currentListType == DressUpListType.List2)
  372. {
  373. this.showListType1();
  374. this.hideListType2();
  375. }
  376. else if (this.currentListType == DressUpListType.List4)
  377. {
  378. this.showListType1();
  379. this.hideListType2();
  380. }
  381. else if (this.currentListType == DressUpListType.List5)
  382. {
  383. this.showListType1();
  384. this.hideSearchListType();
  385. }
  386. // _ui.m_comListType1.m_listType.numItems = _ui.m_comListType1.m_listType.numItems;
  387. // this.ShowSubList();
  388. }
  389. private void OnClickBtnDelete()
  390. {
  391. MyDressUpHelper.dressUpObj.TakeOffAll();
  392. MyDressUpHelper.dressUpObj.AddOrRemove(ConstItemID.DEFULT_BG, false);
  393. UpdateBtnAction();
  394. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  395. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  396. UpdateStepBtn(true);
  397. }
  398. private void OnClickBtnSave()
  399. {
  400. CustomSuitDataManager.SaveCurrentSuit(_ui.m_comboBox.selectedIndex);
  401. }
  402. private void OnComboBoxRarityChanged()
  403. {
  404. _rarityIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  405. this.UpdatePartsListSort();
  406. }
  407. private void OnSearchComboBoxRarityChanged()
  408. {
  409. _rarityIndex = _ui.m_partsListSearch.m_comboBoxRarity.selectedIndex;
  410. this.UpdateSearchList();
  411. }
  412. private void OnClickBtnAction()
  413. {
  414. MyDressUpHelper.dressUpObj.PutOnOrTakeOffAction(201003);
  415. }
  416. private void OnClickBtnSearch()
  417. {
  418. ViewManager.Show<DressFilterView>(true, new object[] { ViewName.DRESS_UP_VIEW });
  419. }
  420. private void showListType1()
  421. {
  422. _currentList2 = null;
  423. currentListType = DressUpListType.List1;
  424. _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length;
  425. GTween.To(_ui.target.width, listType1X, 0.5f)
  426. .SetTarget(_ui.m_comListType1.target)
  427. .OnUpdate((GTweener t) =>
  428. {
  429. _ui.m_comListType1.target.x = t.value.x;
  430. });
  431. }
  432. private void hideListType1()
  433. {
  434. GTween.To(listType1X, _ui.target.width, 0.5f)
  435. .SetTarget(_ui.m_comListType1.target)
  436. .OnUpdate((GTweener t) =>
  437. {
  438. _ui.m_comListType1.target.x = t.value.x;
  439. });
  440. }
  441. private void showListType2(int[] menuStrArr = null)
  442. {
  443. currentListType = DressUpListType.List2;
  444. if (menuStrArr != null && menuStrArr.Length > 0)
  445. {
  446. int len = menuStrArr.Length;
  447. _currentList2 = menuStrArr.Clone() as int[];
  448. _ui.m_comListType2.m_listType.RemoveChildrenToPool();
  449. _ui.m_comListType2.m_listType.numItems = len;
  450. //_ui.m_comListType2.m_listType2.ResizeToFit(_ui.m_comListType2.m_listType2.numItems);
  451. float maxHeight = _ui.target.height - _ui.m_comListType2.m_listType.y - DressUpView.BOTTOM_BLANK;
  452. if (_ui.m_comListType2.m_listType.height > maxHeight)
  453. {
  454. _ui.m_comListType2.m_listType.height = maxHeight;
  455. }
  456. }
  457. GTween.To(_ui.target.width, listType1X, 0.5f)
  458. .SetTarget(_ui.m_comListType2.target)
  459. .OnUpdate((GTweener t) =>
  460. {
  461. _ui.m_comListType2.target.x = t.value.x;
  462. });
  463. }
  464. private void hideListType2()
  465. {
  466. GTween.To(listType1X, _ui.target.width, 0.5f)
  467. .SetTarget(_ui.m_comListType2.target)
  468. .OnUpdate((GTweener t) =>
  469. {
  470. _ui.m_comListType2.target.x = t.value.x;
  471. });
  472. }
  473. private bool showListParts(int type, bool selectItem = false)
  474. {
  475. _currentMenuType = type;
  476. if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
  477. {
  478. _ui.m_partsList.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
  479. if (_rarityIndex >= SORT_BY_GET_TIME)
  480. {
  481. _rarityIndex = SORT_BY_HIGH_RARITY;
  482. }
  483. }
  484. else
  485. {
  486. _ui.m_partsList.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
  487. }
  488. this.UpdatePartsListSort();
  489. if (_ui.m_partsList.m_list.numItems <= 0) return false;
  490. _ui.m_partsList.m_list.ResizeToFit(_ui.m_partsList.m_list.numItems);
  491. float maxHeight = _ui.m_partsList.target.height - _ui.m_partsList.m_list.y;// - DressUpView.BOTTOM_BLANK;
  492. if (_ui.m_partsList.m_list.height > maxHeight)
  493. {
  494. _ui.m_partsList.m_list.height = maxHeight;
  495. }
  496. if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
  497. {
  498. _ui.m_partsList.m_list.scrollPane.SetPosY(partsListScrollingPosY, false);
  499. partsListScrollingPosY = 0;
  500. }
  501. currentListType = DressUpListType.List3;
  502. GTween.To(_ui.target.width, partsListX, 0.5f)
  503. .SetTarget(_ui.m_partsList)
  504. .OnUpdate((GTweener t) =>
  505. {
  506. _ui.m_partsList.target.x = t.value.x;
  507. });
  508. UpdateBtnAction();
  509. UpdateListPartsSelected();
  510. return true;
  511. }
  512. private void hideListParts()
  513. {
  514. // _currentMenuType = 0;
  515. UpdateBtnAction();
  516. GTween.To(partsListX, _ui.target.width, 0.5f)
  517. .SetTarget(_ui.m_partsList)
  518. .OnUpdate((GTweener t) =>
  519. {
  520. _ui.m_partsList.target.x = t.value.x;
  521. });
  522. }
  523. private void showListParts2(int suitId)
  524. {
  525. _currentSuitId = suitId;
  526. _ui.m_partsList2.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
  527. if (_rarityIndex >= SORT_BY_GET_TIME)
  528. {
  529. _rarityIndex = SORT_BY_HIGH_RARITY;
  530. }
  531. this.UpdateSuitPartsListSort();
  532. _ui.m_partsList2.m_list.ResizeToFit(_ui.m_partsList2.m_list.numItems);
  533. float maxHeight = _ui.m_partsList2.target.height - _ui.m_partsList2.m_list.y;// - DressUpView.BOTTOM_BLANK;
  534. if (_ui.m_partsList2.m_list.height > maxHeight)
  535. {
  536. _ui.m_partsList2.m_list.height = maxHeight;
  537. }
  538. currentListType = DressUpListType.List4;
  539. GTween.To(_ui.target.width, partsListX, 0.5f)
  540. .SetTarget(_ui.m_partsList2)
  541. .OnUpdate((GTweener t) =>
  542. {
  543. _ui.m_partsList2.target.x = t.value.x;
  544. });
  545. UpdateBtnAction();
  546. }
  547. private void hideListParts2()
  548. {
  549. _currentMenuType = ConstDressUpItemType.TAO_ZHUANG;
  550. UpdateBtnAction();
  551. GTween.To(partsListX, _ui.target.width, 0.5f)
  552. .SetTarget(_ui.m_partsList2)
  553. .OnUpdate((GTweener t) =>
  554. {
  555. _ui.m_partsList2.target.x = t.value.x;
  556. });
  557. }
  558. private void showSearchListType()
  559. {
  560. // _currentList2 = null;
  561. currentListType = DressUpListType.List5;
  562. GTween.To(_ui.target.width, partsListX, 0.5f)
  563. .SetTarget(_ui.m_partsListSearch.target)
  564. .OnUpdate((GTweener t) =>
  565. {
  566. _ui.m_partsListSearch.target.x = t.value.x;
  567. });
  568. }
  569. private void hideSearchListType()
  570. {
  571. GTween.To(partsListX, _ui.target.width, 0.5f)
  572. .SetTarget(_ui.m_partsListSearch.target)
  573. .OnUpdate((GTweener t) =>
  574. {
  575. _ui.m_partsListSearch.target.x = t.value.x;
  576. });
  577. }
  578. /****************************************************************************************************************************/
  579. private void DressResetSerch()
  580. {
  581. if (currentListType == DressUpListType.List5)
  582. {
  583. OnTouchPad();
  584. }
  585. }
  586. private void UpdateSerch(EventContext context)
  587. {
  588. if (context.data.ToString() == ConstMessage.DRESS_SEARCH)
  589. {
  590. _currentList3 = DressUpMenuItemDataManager.DressSearch();
  591. }
  592. else if (context.data.ToString() == ConstMessage.DRESS_FILTER)
  593. {
  594. _currentList3 = DressUpMenuItemDataManager.DressFilter();
  595. }
  596. ViewManager.Hide<ModalStatusView>();
  597. UpdateSearchList();
  598. if (currentListType != DressUpListType.List5)
  599. {
  600. hideListParts();
  601. hideListParts2();
  602. hideListType1();
  603. hideListType2();
  604. showSearchListType();
  605. }
  606. _currentMenuType = 0;
  607. }
  608. private void UpdateSearchList()
  609. {
  610. if (_rarityIndex == SORT_BY_HIGH_RARITY)
  611. {
  612. _currentList3 = DressUpMenuItemDataManager.SortItemListByHighRarity(_currentList3);
  613. }
  614. else if (_rarityIndex == SORT_BY_LOW_RARITY)
  615. {
  616. _currentList3 = DressUpMenuItemDataManager.SortItemListByLowRarity(_currentList3);
  617. }
  618. _currentMenuType = 0;
  619. _ui.m_partsListSearch.m_list.numItems = _currentList3.Count; ;
  620. }
  621. private void ListType1Item(int index, GObject item)
  622. {
  623. UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
  624. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[index];
  625. typeItem.m_icon.url = "ui://DressUp/hz_fenleitu_" + item1.id;
  626. typeItem.m_txtname.text = item1.name;
  627. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconzi_" + item1.id;
  628. typeItem.target.data = item1.id;
  629. typeItem.m_imgNeed.visible = false;
  630. typeItem.m_imgNew.visible = DressUpMenuItemDataManager.CheckIsFirstMenuNew(item1.id);
  631. UI_TypeItem.ProxyEnd();
  632. }
  633. private void ListType2Item(int index, GObject item)
  634. {
  635. UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
  636. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[_currentList2[index] - 1];
  637. typeItem.m_icon.url = "ui://DressUp/hz_fenleituej_" + item2.id;
  638. typeItem.m_txtname.text = item2.name;
  639. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconziej_" + item2.id;
  640. typeItem.target.data = item2.id;
  641. typeItem.m_imgNeed.visible = false;
  642. typeItem.m_imgNew.visible = DressUpMenuItemDataManager.CheckIsSecondMenuNew(item2.id);
  643. UI_TypeItem.ProxyEnd();
  644. }
  645. private void ListPartsItem(int index, GObject item)
  646. {
  647. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  648. int id = (int)_currentList3[index];
  649. string iconRes = "";
  650. string partName = "";
  651. string ext = "png";
  652. listItem.m_btnAni.visible = false;
  653. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  654. {
  655. SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
  656. iconRes = suitCfg.res;
  657. partName = suitCfg.name;
  658. listItem.m_iconSelected.visible = false;
  659. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, true);
  660. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + suitCfg.rarity;
  661. listItem.m_ScoreType.visible = false;
  662. listItem.m_imgNew.visible = false;
  663. listItem.m_btnAni.visible = SuitCfgArray.Instance.CheckSuitHasAction(id) && DressUpMenuSuitDataManager.CheckSuitHasActionRes(id);
  664. // listItem.m_comAxtionSelect.m_btnNormal.icon = ResPathUtil.GetIconPath(suitCfg.res, ext);
  665. // listItem.m_comAxtionSelect.m_btnAction.icon = ResPathUtil.GetIconPath(suitCfg.res, ext);
  666. if (listItem.m_btnAni.data == null)
  667. {
  668. listItem.m_btnAni.onClick.Add(OnBtnActionClick);
  669. }
  670. listItem.m_btnAni.data = id;
  671. }
  672. else if (_currentMenuType == (int)ConstDressUpItemType.DONG_ZUO)
  673. {
  674. SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
  675. iconRes = suitCfg.res;
  676. partName = suitCfg.name;
  677. listItem.m_iconSelected.visible = false;
  678. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, true);
  679. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + suitCfg.rarity;
  680. listItem.m_ScoreType.visible = false;
  681. listItem.m_imgNew.visible = false;
  682. }
  683. else
  684. {
  685. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  686. iconRes = itemCfg.res;
  687. partName = itemCfg.name;
  688. listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  689. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  690. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  691. // ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
  692. listItem.m_ScoreType.visible = true;
  693. listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + itemCfg.mainScore);
  694. bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
  695. listItem.m_imgNew.visible = isNew;
  696. if (isNew)
  697. {
  698. ItemProxy.ReqSetItemRead(id).Coroutine();
  699. }
  700. }
  701. if (listItem.m_icon.data == null)
  702. {
  703. listItem.m_icon.onClick.Add(OnClickPartsListItem);
  704. }
  705. listItem.m_icon.data = id;
  706. if (listItem.target.data == null)
  707. {
  708. LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
  709. longPressGesture.once = true;
  710. longPressGesture.onAction.Add(OnLongPress);
  711. _listLongPress.Add(longPressGesture);
  712. }
  713. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  714. listItem.m_txtTitle.text = partName;
  715. listItem.target.data = id;
  716. listItem.m_grpScore.visible = false;
  717. //listItem.m_ScoreType.visible = true;
  718. listItem.m_imgNeed.visible = false;
  719. UI_PartsListItem.ProxyEnd();
  720. }
  721. private void ListParts2Item(int index, GObject item)
  722. {
  723. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  724. int id = (int)_currentList4[index];
  725. string iconRes = "";
  726. string partName = "";
  727. // string ext = "png";
  728. if (listItem.target.data == null)
  729. {
  730. LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
  731. longPressGesture.once = true;
  732. longPressGesture.onAction.Add(OnLongPress);
  733. _listLongPress.Add(longPressGesture);
  734. }
  735. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  736. SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
  737. iconRes = itemCfg != null ? itemCfg.res : suitCfg.res;
  738. partName = itemCfg != null ? itemCfg.name : suitCfg.name;
  739. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  740. bool isAction = MyDressUpHelper.dressUpObj.IsAction && SuitCfgArray.Instance.CheckActionContainsItem(id, MyDressUpHelper.dressUpObj.actionId);
  741. listItem.m_iconSelected.visible = isPutOn || isAction;
  742. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, itemCfg == null);
  743. listItem.m_ScoreType.visible = false;
  744. if (itemCfg != null)
  745. {
  746. listItem.m_ScoreType.visible = true;
  747. listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + itemCfg.mainScore);
  748. }
  749. listItem.m_btnAni.visible = false;
  750. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, "png");
  751. listItem.m_txtTitle.text = partName;
  752. listItem.target.data = id;
  753. listItem.m_grpScore.visible = false;
  754. //listItem.m_ScoreType.visible = true;
  755. listItem.m_imgNeed.visible = false;
  756. bool isNew = DressUpMenuItemDataManager.CheckIsDressUpItemNew(id);
  757. listItem.m_imgNew.visible = isNew;
  758. if (isNew)
  759. {
  760. ItemProxy.ReqSetItemRead(id).Coroutine();
  761. }
  762. UI_PartsListItem.ProxyEnd();
  763. }
  764. private void UpdateListPartsSelected(int selectSuitId = 0)
  765. {
  766. int count = _ui.m_partsList.m_list.numChildren;
  767. int suitId = MyDressUpHelper.dressUpObj.suitId;
  768. for (int i = 0; i < count; i++)
  769. {
  770. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList.m_list.GetChildAt(i));
  771. int id = (int)listItem.target.data;
  772. if (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG)
  773. {
  774. listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
  775. }
  776. else if (_currentMenuType == ConstDressUpItemType.DONG_ZUO)
  777. {
  778. listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.IsAction && MyDressUpHelper.dressUpObj.actionId == id;
  779. }
  780. else
  781. {
  782. bool isPutOn = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
  783. bool isAction = MyDressUpHelper.dressUpObj.IsAction && SuitCfgArray.Instance.CheckActionContainsItem(id, MyDressUpHelper.dressUpObj.actionId);
  784. listItem.m_iconSelected.visible = isPutOn || isAction;
  785. }
  786. UI_PartsListItem.ProxyEnd();
  787. }
  788. }
  789. private void UpdateListSuitPartsSelected()
  790. {
  791. int count = _ui.m_partsList2.m_list.numChildren;
  792. for (int i = 0; i < count; i++)
  793. {
  794. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList2.m_list.GetChildAt(i));
  795. int id = (int)listItem.target.data;
  796. bool isSuitSelect = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);//可换部件是否穿戴
  797. bool isActionSelect = MyDressUpHelper.dressUpObj.actionId == id;
  798. listItem.m_iconSelected.visible = isSuitSelect || isActionSelect;
  799. UI_PartsListItem.ProxyEnd();
  800. }
  801. }
  802. private void UpdatePartsListSort()
  803. {
  804. if (_currentMenuType == 0) return;
  805. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  806. {
  807. _currentList3 = DressUpMenuSuitDataManager.GetSuitIDList();
  808. if (_rarityIndex == SORT_BY_HIGH_RARITY)
  809. {
  810. _currentList3 = SuitUtil.SortSuitListByHighRarity(_currentList3);
  811. }
  812. else if (_rarityIndex == SORT_BY_LOW_RARITY)
  813. {
  814. _currentList3 = SuitUtil.SortSuitListByLowRarity(_currentList3);
  815. }
  816. else
  817. {
  818. _currentList3.Reverse();
  819. }
  820. }
  821. else if (_currentMenuType == (int)ConstDressUpItemType.DONG_ZUO)
  822. {
  823. _currentList3 = DressUpMenuSuitDataManager.GetActionIDList();
  824. if (_rarityIndex == SORT_BY_HIGH_RARITY)
  825. {
  826. _currentList3 = SuitUtil.SortSuitListByHighRarity(_currentList3);
  827. }
  828. else if (_rarityIndex == SORT_BY_LOW_RARITY)
  829. {
  830. _currentList3 = SuitUtil.SortSuitListByLowRarity(_currentList3);
  831. }
  832. else
  833. {
  834. _currentList3.Reverse();
  835. }
  836. }
  837. else
  838. {
  839. _currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
  840. if (_rarityIndex == SORT_BY_HIGH_RARITY)
  841. {
  842. _currentList3 = DressUpMenuItemDataManager.SortItemListByHighRarity(_currentList3);
  843. }
  844. else if (_rarityIndex == SORT_BY_LOW_RARITY)
  845. {
  846. _currentList3 = DressUpMenuItemDataManager.SortItemListByLowRarity(_currentList3);
  847. }
  848. else
  849. {
  850. _currentList3.Reverse();
  851. }
  852. }
  853. // if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  854. // {
  855. // _currentList3 = DressUpMenuItemDataManager.DressSearch(_currentList3);
  856. // }
  857. // else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  858. // {
  859. // _currentList3 = DressUpMenuItemDataManager.DressFilter(_currentList3);
  860. // }
  861. _ui.m_partsList.m_list.RemoveChildrenToPool();
  862. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  863. }
  864. private void UpdateSuitPartsListSort()
  865. {
  866. if (_currentMenuType == 0) return;
  867. if (_isNormalSuitType)
  868. {
  869. _currentList4 = new List<int>(SuitCfgArray.Instance.GetSuitItems(_currentSuitId));
  870. }
  871. else
  872. {
  873. _currentList4 = SuitCfgArray.Instance.GetOneSuitAllNotActionParts(_currentSuitId);
  874. _currentList4.Add(_currentSuitId);
  875. }
  876. // if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  877. // {
  878. // _currentList4 = DressUpMenuItemDataManager.DressSearch(_currentList4);
  879. // }
  880. // else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  881. // {
  882. // _currentList4 = DressUpMenuItemDataManager.DressFilter(_currentList4);
  883. // }
  884. _ui.m_partsList2.m_list.RemoveChildrenToPool();
  885. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  886. }
  887. private void UpdateBtnAction()
  888. {
  889. // _ui.m_btnAction.visible = (_currentMenuType == ConstDressUpItemType.TAO_ZHUANG) || this.currentListType == DressUpListType.List4;
  890. // if (_ui.m_btnAction.visible)
  891. // {
  892. //_ui.m_btnAction.grayed = !EquipDataCache.cacher.HasSuitActionRes;
  893. // }
  894. }
  895. private void OnClickBtnShow()
  896. {
  897. Timers.inst.Remove(SetBtnShowVisable);
  898. _ui.m_c1.selectedIndex = 0;
  899. _ui.m_btnHide.visible = true;
  900. _ui.m_btnShow.visible = false;
  901. _ui.m_loaShow.visible = false;
  902. }
  903. private void OnClickBtnHide()
  904. {
  905. _ui.m_c1.selectedIndex = 1;
  906. _ui.m_btnHide.visible = false;
  907. _ui.m_btnShow.visible = true;
  908. _ui.m_loaShow.visible = true;
  909. Timers.inst.Add(2f, 1, SetBtnShowVisable);
  910. }
  911. private void OnClickLoaShow()
  912. {
  913. _ui.m_btnShow.alpha = 1;
  914. _ui.m_btnShow.enabled = true;
  915. Timers.inst.Add(2f, 1, SetBtnShowVisable);
  916. }
  917. private void OnClickBtnPhoto()
  918. {
  919. LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.PAI_ZHAO, 1);
  920. if (!ViewManager.Show<PhotographView>())
  921. {
  922. return;
  923. }
  924. _ui.target.visible = false;
  925. this._sceneObject.gameObject.SetActive(false);
  926. }
  927. private void OnClickBtnNext()
  928. {
  929. // if (!EquipDataCache.cacher.CheckPutOnFinish())
  930. // {
  931. // AlertUI.Show("只有换好衣服才能出门哦!")
  932. // .SetRightButton(true, "好的");
  933. // return;
  934. // }
  935. if (!ViewManager.Show<PhotographView>(this.viewData))
  936. {
  937. return;
  938. }
  939. _ui.target.visible = false;
  940. this._sceneObject.gameObject.SetActive(false);
  941. }
  942. private void UpdateScene()
  943. {
  944. _ui.target.visible = true;
  945. this._sceneObject.gameObject.SetActive(true);
  946. }
  947. private void SetBtnShowVisable(object param)
  948. {
  949. _ui.m_btnShow.enabled = false;
  950. GTween.To(1, 0, 0.3f).SetTarget(_ui.m_btnShow, TweenPropType.Alpha);
  951. }
  952. private bool CheckListCount(int type)
  953. {
  954. if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
  955. {
  956. return DressUpMenuSuitDataManager.GetSuitIDList().Count > 0;
  957. }
  958. else
  959. {
  960. return DressUpMenuItemDataManager.getItemDatasByType(type).Count > 0;
  961. }
  962. }
  963. private void CheckGuide(object param)
  964. {
  965. if (GuideDataManager.IsGuideFinish(ConstGuideId.FREEDOM_DRESS) <= 0
  966. || GuideDataManager.IsGuideFinish(ConstGuideId.ENTER_CHAPTER) <= 0)
  967. {
  968. UpdateToCheckGuide(null);
  969. }
  970. else
  971. {
  972. Timers.inst.Remove(CheckGuide);
  973. }
  974. }
  975. protected override void UpdateToCheckGuide(object param)
  976. {
  977. if (!ViewManager.CheckIsTopView(this.viewCom)) return;
  978. if (listTypeItem_FreedomDress == null && GuideDataManager.IsGuideFinish(ConstGuideId.FREEDOM_DRESS) <= 0)
  979. {
  980. int len = _ui.m_comListType1.m_listType.numChildren;
  981. for (int i = 0; i < len; i++)
  982. {
  983. UI_TypeItem item = UI_TypeItem.Proxy(_ui.m_comListType1.m_listType.GetChildAt(i));
  984. if (item != null)
  985. {
  986. int menuID = (int)item.target.data;
  987. DressUpMenuItemCfg1 dressUpMenuItemCfg1 = DressUpMenuItemCfg1Array.Instance.GetCfg(menuID);
  988. if (dressUpMenuItemCfg1.type == ConstDressUpItemType.TAO_ZHUANG)
  989. {
  990. listTypeItem_FreedomDress = item;
  991. _ui.m_comListType1.m_listType.ScrollToView(i);
  992. break;
  993. }
  994. }
  995. UI_TypeItem.ProxyEnd();
  996. }
  997. }
  998. if (listTypeItem_FreedomDress != null) GuideController.TryGuide(listTypeItem_FreedomDress.target, ConstGuideId.FREEDOM_DRESS, 3, "套装分类里,可以查看集齐成套的服饰,点击一键换上。");
  999. GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.FREEDOM_DRESS, 4, "", 0);
  1000. // if (_ui.m_partsList.m_list.numItems > 0)
  1001. // {
  1002. // UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList.m_list.GetChildAt(0).asCom);
  1003. // GuideController.TryGuide(listItem.m_comAxtionSelect.m_btnAction, ConstGuideId.FREEDOM_DRESS, 5, "选择特殊动作并穿上。");
  1004. // UI_PartsListItem.ProxyEnd();
  1005. // }
  1006. GuideController.TryGuide(_ui.m_btnSave, ConstGuideId.FREEDOM_DRESS, 5, "搭配好的服饰,可以保存到主界面显示。");
  1007. GuideController.TryGuide(_ui.m_btnPhoto, ConstGuideId.FREEDOM_DRESS, 6, "辛苦搭配完,去拍个照片留念呀~~");
  1008. GuideController.TryGuide(_ui.m_btnBack, ConstGuideId.ENTER_CHAPTER, 2, "");
  1009. }
  1010. }
  1011. }